Windows Phone 8 클래스 라이브러리가 있습니다. 클래스 라이브러리 내에서 System.ServiceModel을 사용합니다. Windows Phone 8 앱에서 사용하면 클래스 라이브러리가 잘 실행됩니다.System.ServiceModel을 사용하는 Windows Phone 클래스 라이브러리를 테스트하는 방법
단위 테스트 프로젝트가 있습니다. 두 System.Service 모델 어셈블리는 다른 때문에 내가 바인딩 재 - 직접 사용하려고했습니다
{"Could not load file or assembly 'System.ServiceModel,
Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
or one of its dependencies. The system cannot find the file
specified.":"System.ServiceModel, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"}
:하지만, 나는 시도하고 클래스 라이브러리에서 방법을 테스트하기 위해 단위 테스트 프로젝트를 사용하는 경우 나는 FileNotFoundExcaption를 얻을 수 작동하지 않는 publicKeyTokens.
이것이 가능합니까?
전체 융합 로그는이에
=== Pre-bind state information ===
LOG: User = MACHINENAME\Simon
LOG: DisplayName = System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///c:/[...]/PhoneClassLibraryReferenceTest/PhoneClassLibraryTest/bin/Debug
LOG: Initial PrivatePath = NULL
Calling assembly : PhoneClassLibraryReferenceTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.x86.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///c:/[...]/PhoneClassLibraryReferenceTest/PhoneClassLibraryTest/bin/Debug/System.ServiceModel.DLL.
LOG: Attempting download of new URL file:///c:/[...]/PhoneClassLibraryReferenceTest/PhoneClassLibraryTest/bin/Debug/System.ServiceModel/System.ServiceModel.DLL.
LOG: Attempting download of new URL file:///c:/[...]/PhoneClassLibraryReferenceTest/PhoneClassLibraryTest/bin/Debug/System.ServiceModel.EXE.
LOG: Attempting download of new URL file:///c:/[...]/PhoneClassLibraryReferenceTest/PhoneClassLibraryTest/bin/Debug/System.ServiceModel/System.ServiceModel.EXE.