开发者

convert class libraries from asp.net 3.5 to 4

开发者 https://www.devze.com 2023-01-26 00:04 出处:网络
I have a Solution that has two class libraries.I\'m trying to convert the whole solution from asp.net 3.5 to 4.

I have a Solution that has two class libraries. I'm trying to convert the whole solution from asp.net 3.5 to 4.

Right now the libraries are in my Visual Studio 2008 projects folder. I've installed VS 2010. Should I just开发者_运维问答 copy the libraries from the 2008 project folder to my 2010 project folder and open them in VS 2010?

What is the best practices for this? The entire solution is in a single folder in my VS 2008 Project folder, and each application and class library is in their own subfolder.

Thank you!


Just open the sln-file from VS 2010 and VS 2010 will convert all your projects to VS 2010 automatically.

Then you need to change target framework from 3.5 to 4.0. You need to do that for each project by right-click->Properties in solution explorer and on the "Application tab" change "Target framework" to 4.0.


Could just open the 2008 solution in 2010, it will convert it. If you don't need a 2008 solution that should be fine. And as long as you don't need a 2008 solution no need to copy anything. And if you don't use any specific 2010 features you should be able to copy the 2008 solution file and have both a 2008 and 2010 file. But just changing the targeting might be better.


I personally like to start a new project and copy the files over because I don't trust/like these conversions 100%. I just feel better if I start fresh. But as other said you can copy your project anywhere. I don't use the Visual Studio 20** project folders as I separate my pure .NET projects from web applications and so on.

But you can try to see if there's any difference between a clean VS2010 solution and a VS2008 solution that has been converted and then set the target to .NET 4.0. The differences will probably be in the .sln and .csproj files. You can use Notepad++'s compare feature.

0

精彩评论

暂无评论...
验证码 换一张
取 消