Choosing a .Net Framework Service Pack to Build

I read a lot of questions (and answers) here in which they had similar terms, such as this question, but they all ended up in creation against different major versions of .Net. Unfortunately, I experience much deeper problems.

Here is the story. Our customers use version 2.0.Net framework. Only 2.0, no service packs at all. Our developers used .NET 2.0 SP1, which worked great. Now, thanks to the other projects we're working on, the developers (including me) have been upgraded to .Net 2.0 SP2. And then the trouble started. Apparently, in its infinite wisdom, MS decided to change / add the API to the framework without increasing the main version (to, say, 2.1). Therefore, when you create against 2.0, it builds against 2.0 SP2 (if you installed it), and there seems to be no way to configure it. Thus, the developer can now write code, thinking that it is aimed at 2.0, but it will not work on client machines!

We noticed that some builds (done using msbuild) started crashing in our test windows, but they work fine on development machines. Obviously, because the test box is configured the way client machines work, and in their old structure some of the APIs are missing. Now the build farm is about to install a newer version of the CLR (including spervice packages and higher major versions) to test all of our projects, so builds using APIs that are not in the original 2.0 will no longer fail ... this is terrible news for compatibility testing.

So my question is this. How to build (using msbuild) for a specific version of the CLR (the same major version). Otherwise, how can I make sure that VS2005 gives an error when functions are incompatible with a particular revSion CLR in a particular project (to pull out a key into the screws, without FxCop or similar integration, only basic VS2005 functions)?

If the above questions do not have a positive answer, I all want to look for alternatives.

Thanks.

+4
source share
2 answers

There was no need to influence the upgrade to SP2 if you did not use the new APIs. Exactly what kind of glitches did you see on the build machine?

I agree, BTW, that they should not have added anything without changing the minor rev. It was for Vista, but they lost their heads.

I think.

+1
source

I have run this problem with 3.5 SP1 ; Unfortunately, there is no easy solution. The only solution is either 1) to hope that changes from service packs will not affect you β€” sometimes they do it, sometimes they don’t do it β€” or 2) create separate build machines, each of which has only a corresponding service pack, and build there.

+1
source

All Articles