从Visual Studio 2010的降级C#项目到Visual Studio 2008
问题描述:
我写了一个Visual C#2008 Windows窗体应用程序,然后我编辑了其中有Visual Studio 2010中的计算机代码,但我不能再在视觉2008年运行它,是有办法,我可以做到这一点?
I wrote a visual c# 2008 windows form application ,then i edited the code in a computer which had visual studio 2010,but i can no longer run it in visual 2008,is there a way i can do this?
答
当你说无法再运行它......发生什么事?
When you say "can no longer run it"... what happens?
- 的SLN文件是不兼容;你需要为每个版本的VS SLN不同的文件
- 的是的csproj的大多的兼容,虽然你可能会看到一个版本4无法识别,使用3.5代替警告或二,通常是罚款
- 的CS是,只要你不使用
动态
或其他新语言兼容功能
- the sln files are not compatible; you'll need different sln files for each VS version
- 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
- the cs is compatible as long as you don't use
dynamic
or the other new language features
在大多数情况下,你可以逃脱只是有VS2010为一个单独的SLN。因此,只要将其重命名为Whatever_2010.sln,让您的老Whatever.sln从源存储库回来,并将其重命名为Whatever_2008.sln。
In most cases you can get away with just having a separate sln for VS2010. 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".