2010-05-19 2 views
1
내가 원격 시스템에 NUNIT 테스트를 실행하는 pnunit을 사용하고

의 pnunit 에이전트가 테스트를로드 및 Windows 2008을 실행하지만 테스트가 윈도우 2003에로드되지, 에이전트 오류가 procmon을 실행에특정 버전의 .NET을 사용하는 응용 프로그램을 얻는 방법?

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) 

입니다 에이전트 프로세스를 모니터링하면 에이전트 실행 파일이 Windows 2003의 .NET 1.1 어셈블리와 Windows 2008의 .NET 2.0을 사용하고 있음을 알 수 있습니다.이 동작에 대한 설명이 될 수 있습니다. 에이전트가 Windows 2003에서 .NET 2.0을 사용하도록하려면 어떻게합니까? Visual Studio 2005를 사용하여 테스트를 만듭니다.

+0

Windows 2003 x86 및 Windows 2008 x64입니까? –

+1

2003 컴퓨터에 .Net 2.0이 설치되어 있는지 확인할 수 있습니까? 그것은 닷넷 2.0을 선택하지 않은 것은 이상하다. 2008 년 머신의 .Net 2.0 프레임 워크가 기본이기 때문에 2003 년 박스에 설치 되었다면 .Net 2.0이다. – Sijin

+0

@Sijin, 왜 이것이 이상할까요? 기본적으로 정확히 일치하는 런타임은 이전에이 문제점에 대한 내 경험에서 알 수있는 한 선택됩니다. 따라서 1.1과 2.0이있는 컴퓨터에서 1.0 응용 프로그램을 실행하려면 2.0을로드 할 수 있지만 1.1이있는 컴퓨터에서는 1.1 응용 프로그램이 1.1을 사용하게됩니다. – Lucero

답변

0

는 (이 2.0 RTM을 위해 당신이 원하는 버전 물론) 다음 병합/응용 프로그램에 대한 .config 파일을 만들고 삽입 :

<configuration> 
    <startup> 
    <supportedRuntime version="v2.0.50727"/> 
    <requiredRuntime version="v2.0.50727" safemode="true"/> 
    </startup> 
</configuration> 

예를 들어이도를위한 .NET이로드됩니다 1.1 응용 프로그램 또는 관리되지 않는 응용 프로그램이 1.1 COM 개체를 활성화하는 경우.

+0

감사합니다. – carrutherji

관련 문제