views:

94

answers:

3

I am developing using 3.0 and VS 2008.

The problem is my build server does not have 3.5 installed and therefore I cant build the solution as MSBuild for 2.0 will not support the VS 2008 solution file.

There is no easy answer to this besides downgrading to VS 2005.

Any ideas folks?

+1  A: 

VS2008 supports C# 3 - you may be using C# 3-specific features while still targeting .NET 2.0.

Is there a strong reason why you can't install .NET 3.5 on the build server? That would be my preferred solution, rather than regressing the version of VS you use.

You could probably automate downgrading the solution/project files - if you're not doing anything complicated, it'll just be a matter of changing version numbers - but it's not great to have the build server using a different compiler to the developers, IMO.

Jon Skeet
I'd have to agree - if at all possible you should upgrade the server and then, if required, be explicit about targets in your projects
Murph
Hi Tony the Pony,Our test and production servers are .NET 3.0. Im going to downgrade my solution back to 2005 however I really want to use VS 2008. Just unfortunate that MS didnt consider users may want to use MSBUILD to target VS 2008 3.0 solutions without having 3.5 installed. Seems like incentive based software releases.
Jonathan
I cant change production and test environments. I work for a major bank and there is no chance of this without the proper procedures ...
Jonathan
You don't need to change either the production or test environments - just the build environment (which shouldn't count as either). You can still target .NET 3.0, but you'll have to build with .NET 3.5. Anyway, if that's not an option then you should indeed drop down to VS2005 everywhere: build with the same compiler on both the build and dev environments.
Jon Skeet
Its not an option as 3.5 contains a SP for .NET 3.0. This SP has not yest been deployed to Test and Prod. I will downgrrade to VS2005. Im still curious if this is possible though.
Jonathan
+1  A: 

Since you have VS2008 projects and solutions you will need to install .NET 3.5 on you build server. Since you can still target .NET 3.0 or .NET 3.5 having .NET 3.5 installed on your build machine should not have any impact on the target environment.

Sayed Ibrahim Hashimi
I agree, however with 3.5 there is a SP for .NET 3.0. This SP is not currently installed on our test and production server.
Jonathan
In this case you can use FxCop. FxCop will raise the warning CA1903 indicating that the target env will require .NET 3.5 SP1.
Sayed Ibrahim Hashimi
A: 

Is it not possible to include the different versions without 'installing' them? In the repository can you add versioned .NET and point the build script to the version(I'm thinking like a submodule in Git) you want for that project? So instead of installing .NET 3.0, 3.5, 4.0, etc include the libraries?

Phil Langeberg
The evironment needs to replicate the production environment. We dont do this on our production environment. Therefore unsuitable.
Jonathan