I have a Windows Phone 8 class library. Within that class library I make use of System.ServiceModel. The class library runs fine when used from a Windows Phone 8 app.
I have a unit test project. If I try and use the unit test project to test methods in the class library I get a FileNotFoundExcaption:
{"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"}
I've tried using a binding re-direct, but because the two System.Service model assemblies have different publicKeyTokens that doesn't seem to work.
Is this possible?
The full fusion log is:
=== 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.