visual studio backward compatibility
Hi there I have build a project with visual studio 2010 but I now need to open it using an older version vs2008. Is this possible by just开发者_JAVA百科 changing the target framework to .net 3.5?
In my experience, VS2008 can open VS2010 project files if there aren't VS2010-specific bits in it - so simple class libraries or console apps are fine, for example. There will be a warning that the tools version is unknown, but it will basically work. (You'll still need to target .NET 3.5, I believe - I haven't tried opening a .NET 4 project in VS2008, but I wouldn't really expect it to work, at least not if it uses new language features.)
Where I've used this approach, I've had two different solution files - one for VS2008 and one for VS2010, both including the same projects. That way both can open without any problems, and without any conversion prompts. So far it's worked fine.
As I say, that's my experience - YMMV.
I was able to open a project file created in VS2010 by simply opening it in VS2008. I was then able to go into Project Properties and set the target framework - just be sure to check the Build settings too, as 2010 is version 4, which isn't supported in 2008.
In my particular case, I targeted Framework v2.0, which involved removing unused LINQ references. The project compiled happily, and I was able to run the app.
No, the project file format has been extended.
精彩评论