简体   繁体   English

将C#项目从Visual Studio 2010降级到Visual Studio 2008

[英]Downgrade C# Project from visual studio 2010 to visual studio 2008

我编写了一个Visual C#2008 Windows窗体应用程序,然后在装有Visual Studio 2010的计算机中编辑了代码,但是我无法再在Visual 2008中运行它,有没有办法做到这一点?

When you say "can no longer run it"... what happens? 当您说“不再运行”时,会发生什么?

  • the sln files are not compatible; sln文件不兼容; you'll need different sln files for each VS version 每个VS版本需要不同的sln文件
  • the csproj are mostly compatible, although you might see a "version 4 not recognised, using 3.5 instead" warning or two, which is usually fine csproj几乎兼容的,尽管您可能会看到“或无法识别版本4,而使用3.5代替”的警告或两个警告,通常都可以
  • the cs is compatible as long as you don't use dynamic or the other new language features 只要您不使用dynamic或其他新语言功能,cs就是兼容的

In most cases you can get away with just having a separate sln for VS2010. 在大多数情况下,您只需要为VS2010使用单独的sln就可以摆脱困境。 So just rename it to "Whatever_2010.sln", get your old "Whatever.sln" back from your source repository, and rename it to "Whatever_2008.sln". 因此,只需将其重命名为“ Whatever_2010.sln”,从源存储库中恢复旧的“ Whatever.sln”,然后将其重命名为“ Whatever_2008.sln”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM