How to get application to use specific version of .NET?
Posted
by HN
on Stack Overflow
See other posts from Stack Overflow
or by HN
Published on 2010-05-19T13:48:20Z
Indexed on
2010/05/19
13:50 UTC
Read the original article
Hit count: 260
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?
© Stack Overflow or respective owner