Does the ASP.NET code developed on VS 2008 can be used on VS 2005 ??
Sadly, the answer is "it depends" and probably "no". There are some features in VS 2008 that aren't backwards compatible with VS 2005. The easiest way is to take a copy of the code and try it - but the likely outcome is that you've used new features that aren't available - such as...
- .NET 3.5 stuff!
If its targeted for version 2.0 of the runtime, the source will run (mostly) on v2005 however there may be issues with the proj file.
Excuse me, the solution file
Visual Studio 2008 allows you to target either the .NET 2.0, .NET 3.0 or .NET 3.5 .NET Framework. If you have targeted .NET 2.0, then you should be able to use that code either in a .NET 2.0 site, or even in VS2005.
The only difference is that there is a trivial change in the project files (.vbproj or .csproj). You would have to edit the project files to remove the ToolsVersion="3.5"
attribute from the <Project/>
element.
The big issue with ASP.NET when using both 2008 and 2005 is syntax.
It possible in 2008 to write code using C# 3 syntax such as var
or =>
that work find because they are compilied with C# 3. But 2005 only understands C# 2 and won't understand new C# syntax elements. I would guess the same is true of the later version of VB.
So even if you were careful with your framework references you could still be caught out by using syntax incompatible with older compiler versions.