How to get application to use specific version of .NET?
- by HN
Hi,
I am using pnunit to run nunit tests on remote machines, the pnunit agent loads the test and runs it in Windows 2008 but the test fails to load in Windows 2003, the agent error is
INFO PNUnit.Agent.PNUnitAgent - Registering channel on port 9080
INFO PNUnit.Agent.PNUnitAgent - RunTest called for Test MyTest, AssemblyName test.dll, TestToRun test.Program.myDeployTest
INFO PNUnit.Agent.PNUnitTestRunner - Spawning a new thread
INFO PNUnit.Agent.PNUnitTestRunner - Thread entered for Test MyTest:test.Program.myDeployTest Assembly test.dll
Unhandled Exception: System.BadImageFormatException: The format of the file 'test
' is invalid.
File name: "test"
Server stack trace:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, B
oolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Ass
embly locationHint, StackCrawlMark& stackMark)
On running procmon and monitoring the agent process i could see that the agent executable was using .NET 1.1 assemblies on Windows 2003 and .NET 2.0 on Windows 2008 which could be an explanation for this behavior. How do I get the agent to use .NET 2.0 on Windows 2003?