0

I'm trying to port an application from .net 4.0 to .net 3.5. However, just changing it in Visual Studio is not enough, many references remain to .net 4.0. (See here for example.)

So - Is there a way to use my computer in order to test that this application will run on a computer with 3.5 only, even though my computer has .net 4 installed as well?

Community
  • 1
  • 1
ispiro
  • 26,556
  • 38
  • 136
  • 291
  • http://stackoverflow.com/questions/2046089/force-an-application-to-run-under-specific-net-runtime-version – m0s May 11 '14 at 19:28
  • 1
    A .NET program that run on CLR v2.0.50727 cannot possibly load .NET 4 assemblies. – Hans Passant May 11 '14 at 19:47
  • @HansPassant I'm not saying you're wrong, of course; but why, then, does my application (which has `` in **app.config**) execute fine though it still has many 4.0 references such as in **Forms' resx files**: ` – ispiro May 12 '14 at 12:23
  • Because your app doesn't read .resx files, the resgen.exe build tool does. You ought to fix it, an ImageList will bomb I think. – Hans Passant May 12 '14 at 12:41
  • @HansPassant I've posted a follow up question: http://stackoverflow.com/questions/23610395/winforms-resx-file-referencing-4-0-0-0-works-fine-despite-targeting-clr-2-0-w . – ispiro May 12 '14 at 13:30

2 Answers2

0

Nope.

First of all this is not provided by MS. Features are backward-compatible. If they would be forward-compatible, then you wouldn't have this question asked and we wouldn't have progress. =D

There is no backward project converter as well.

Secondly, for a good test, you really want clean environment, without case to have references to assemblies which are not installed.

Your only bet is either other PC or VM. Installing and using Windows XP one is pretty dawn easy. Go straight for it.

Sinatr
  • 20,892
  • 15
  • 90
  • 319
-2

OK, Apologies. Now, I understand better.

You can simultaneously install multiple .net versions, enable/disable them in the control panel.

See: MSDN reference

HTH

saratogacoach
  • 140
  • 2
  • 9