title: Assembly is not loading in main project when it is called from unit test project
body: <p>I am facing an issue where unit test is failing.</p>
  
  <p>I have kept all resources in resource dictionary in one assembly. I am referencing that assembly in one of my project. I am resolving that resources using pack. Now, I written unit test to my project.</p>
  
  <p>When I run my tests. It is failing saying</p>
  
  <pre><code>        Test method AX.Sensis.PLog.PatientHistoryContainer.UnitTest.PatientHistoryViewModelTest.PatientHistoryEventTest threw exception:
       System.TypeInitializationException: The type initializer for 'AX.Sensis.PLog.PatientHistoryContainer.PatientHistoryViewModel' threw an exception. -
       --&gt; System.IO.FileNotFoundException: Could not load file or assembly 'AX.Sensis.Documentation.Resources, Culture=neutral' or one of its dependencie
       s. The system cannot find the file specified.=== Pre-bind state information ===
       LOG: DisplayName = AX.Sensis.Documentation.Resources, Culture=neutral
        (Partial)
       WRN: Partial binding information was supplied for an assembly:
       WRN: Assembly Name: AX.Sensis.Documentation.Resources, Culture=neutral | Domain ID: 290
       WRN: A partial bind occurs when only part of the assembly display name is provided.
       WRN: This might result in the binder loading an incorrect assembly.
       WRN: It is recommended to provide a fully specified textual identity for the assembly,
       WRN: that consists of the simple name, version, culture, and public key token.
       WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
       LOG: Appbase = file:///U:/AX_Singapore_Sensis/Nebula/Tools/Build/TestResults/Deploy_IC018332 2016-07-13 12_43_19/Out
       LOG: Initial PrivatePath = NULL
       Calling assembly : (Unknown).
       ===
       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\vs
       test.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: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
       Failed   PatientHistoryEventTest
  
       LOG: Attempting download of new URL file:///U:/AX_Singapore_Sensis/Nebula/Tools/Build/TestResults/Deploy_IC018332 2016-07-13 12_43_19/Out/AX.Sensis
       .Documentation.Resources.DLL.
       LOG: Attempting download of new URL file:///U:/AX_Singapore_Sensis/Nebula/Tools/Build/TestResults/Deploy_IC018332 2016-07-13 12_43_19/Out/AX.Sensis
       .Documentation.Resources/AX.Sensis.Documentation.Resources.DLL.
       LOG: Attempting download of new URL file:///U:/AX_Singapore_Sensis/Nebula/Tools/Build/TestResults/Deploy_IC018332 2016-07-13 12_43_19/Out/AX.Sensis
       .Documentation.Resources.EXE.
       LOG: Attempting download of new URL file:///U:/AX_Singapore_Sensis/Nebula/Tools/Build/TestResults/Deploy_IC018332 2016-07-13 12_43_19/Out/AX.Sensis
       .Documentation.Resources/AX.Sensis.Documentation.Resources.EXE.
  
       Stack Trace:
           at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, St
       ackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
          at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, Stac
       kCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
          at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly,
       StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
          at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
          at System.Windows.Navigation.BaseUriHelper.GetLoadedAssembly(String assemblyName, String assemblyVersion, String assemblyKey)
          at MS.Internal.AppModel.ResourceContainer.GetResourceManagerWrapper(Uri uri, String&amp; partName, Boolean&amp; isContentFile)
          at MS.Internal.AppModel.ResourceContainer.GetPartCore(Uri uri)
          at System.IO.Packaging.Package.GetPartHelper(Uri partUri)
          at System.IO.Packaging.Package.GetPart(Uri partUri)
          at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
          at System.IO.Packaging.PackWebResponse.GetResponseStream()
          at System.IO.Packaging.PackWebResponse.get_ContentType()
          at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
          at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType&amp; contentType)
          at System.Windows.ResourceDictionary.set_Source(Uri value)
          at AX.Sensis.PLog.PatientHistoryContainer.PatientHistoryViewModel..cctor()
  </code></pre>