views:

1539

answers:

4

Can I safely download and install .Net framework 3.5 SP1 without requiring my customers to upgrade their .Net Framework distributable?

EDIT: And without changing my build script

EDIT: I'm currently running 3.5

+4  A: 

Yes, as long as your project is targeting the earlier framework version.

Gordon Bell
safe general-purpose answer -- wish I had thought of it!
Danimal
A: 

Yes, but

  • make sure you test against 3.5 without SP1 (a virtual machine is invaluable for stuff like this)
  • Don't use any of the new features introduced with 3.5 SP1 (like ASP.NET Dynamic Data)

It might be possible to deploy all the dependencies (even those normally in the GAC) with your project - I've seen .Net 2.0 SP1 projects using System.Core using this technique - but again make sure you test this thorough in a .Net 3.5 without SP1 environment.

David Kemp
+4  A: 

From hanselman,

On the .NET 3.5 side of things, since this is an SP (Service Pack), yes, some stuff goes in your GAC and gets changed. However, the changes are completely additive. That means if an API's method signature has changed, that's a bug that we need to fix. It will be a fully compatible service pack release. It shouldn't break any of your existing code.

Gulzar
A: 

No, not safely. You cannot configure Visual Studio (2008) to target 3.5SP1, only 3.5. Although the API is almost identical between 3.5 and 3.5SP1 there are a few new functions and constructors in SP1. MSDN doesn't give any help saying when the function was introduced, so there is no way to tell in VS if your new build will work without SP1.

If you run that code in 3.5 without SP1 your application will crash when it runs the actual code, not when the assembly loads.

The solution is to either stick with 3.5 without SP1, or to properly test all your code on a machine without SP1.

Personally, I have a VM machine to test.

L. Kolmodin