问题
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?
回答1:
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.
回答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
来源:https://stackoverflow.com/questions/23596239/on-a-computer-with-net-4-0-can-one-test-that-an-application-will-run-on-net