将类库从 asp.net 3.5 转换为 4
我有一个包含两个类库的解决方案。我正在尝试将整个解决方案从 asp.net 3.5 转换为 4。
现在这些库位于我的 Visual Studio 2008 项目文件夹中。我已经安装了 VS 2010。我是否应该将库从 2008 项目文件夹复制到 2010 项目文件夹并在 VS 2010 中打开它们?
对此的最佳实践是什么?整个解决方案位于我的 VS 2008 Project 文件夹中的一个文件夹中,每个应用程序和类库都位于其自己的子文件夹中。
谢谢你!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只需从 VS 2010 打开 sln 文件,VS 2010 就会自动将所有项目转换为 VS 2010。
然后你需要将目标框架从3.5更改为4.0。您需要为每个项目执行此操作,方法是右键单击解决方案资源管理器中的“属性”,然后在“应用程序选项卡”上将“目标框架”更改为 4.0。
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.
可以在2010年打开2008年的解决方案,它会转换它。如果您不需要 2008 年的解决方案,那应该没问题。只要您不需要 2008 解决方案,就无需复制任何内容。如果您不使用任何特定的 2010 功能,您应该能够复制 2008 解决方案文件并同时拥有 2008 和 2010 文件。但仅仅改变目标可能会更好。
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.
我个人喜欢开始一个新项目并复制文件,因为我不 100% 信任/喜欢这些转换。如果我重新开始,我会感觉更好。但正如其他人所说,您可以在任何地方复制您的项目。我不使用 Visual Studio 20** 项目文件夹,因为我将纯 .NET 项目与 Web 应用程序等分开。
但您可以尝试查看干净的 VS2010 解决方案和已转换的 VS2008 解决方案之间是否有任何差异,然后将目标设置为 .NET 4.0。差异可能存在于 .sln 和 .csproj 文件中。您可以使用Notepad++的比较功能。
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.