views:

25

answers:

1

I have an application built in C# with the .Net Framework 3.5 SP1 (also using wix). The obvious requisite in the running machine is .Net 3.5 SP1, but what if the machine already has .Net 4.0?

Right now I'm having a crash in that machine and only installing the .Net 3.5 SP1 fixes the problem.

Is there a way to avoid the customers that already have .Net 4 to install also the .Net 3.5sp1? Or do I have to recompile the application in .Net Framework 4?

In a similar problem before (compiled in .Net2 and runnable in .Net3.5) I used an app.config with this content - and it fixed that old scenario:

?xml version="1.0"? configuration> startup useLegacyV2RuntimeActivationPolicy="true"> supportedRuntime version="v2.0.50727" /> supportedRuntime version="v4.0" /> /startup> /configuration>

Thanks in advance

A: 

.net 4.0 and .net 3.5 (or 3.0,2.0) are run side by side. you must install .net 3.5 to run your application. .net 3.5 is just an addon for .net 2.0. that's the reason why you walked around the problem.

similar question here http://stackoverflow.com/questions/2642301/do-you-need-both-net-3-5-and-4-0-installed-or-just-net-4

Russel Yang