title: Could not load type from assembly error in Visual Studio 2013 & 2015
body: <p>Need your help guys. I cannot figure this out for the life of me. I have a project that runs fine on Visual Studio 2012. But when I try to use one of the newer visual studio IDEs (2013 or 2015) I get the following error: </p>
  
  <blockquote>
    <p>Could not load type 'XXX.Security.Shared.Logging.Logger' from assembly
    'XXX.Security.Shared, Version=4.7.0.0, Culture=neutral,
    PublicKeyToken=null'. </p>
    
    <p>[TypeLoadException: Could not load type
    'XXX.Security.Shared.Logging.Logger' from assembly
    'XXX.Security.Shared, Version=4.7.0.0, Culture=neutral,
    PublicKeyToken=null'.]<br>
    XXX.Security.IdentityModel.Web.WSFederationAuthenticationModule.InitializeModule(HttpApplication
    context) +0<br>
    Microsoft.IdentityModel.Web.HttpModuleBase.Init(HttpApplication
    context) +34<br>
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
    appContext, HttpContext context, MethodInfo[] handlers) +534<br>
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
    MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172<br>
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
    appContext, HttpContext context) +352<br>
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
    appContext) +296</p>
    
    <p>[HttpException (0x80004005): Could not load type
    'XXX.Security.Shared.Logging.Logger' from assembly
    'XXX.Security.Shared, Version=4.7.0.0, Culture=neutral,
    PublicKeyToken=null'.]<br>
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947444 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
    +101    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context) +261</p>
  </blockquote>
  
  <p>What on earth do I need to change? Here is the relevant web.config</p>
  
  <pre><code> &lt;system.webServer&gt;
  &lt;modules runAllManagedModulesForAllRequests="true"&gt;
    &lt;remove name="FormsAuthentication" /&gt;
    &lt;add name="WSFederationAuthenticationModule" type="XXX.Security.IdentityModel.Web.WSFederationAuthenticationModule, XXX.Security.IdentityModel" preCondition="managedHandler" /&gt;
    &lt;add name="SessionAuthenticationModule" type="XXX.Security.IdentityModel.Web.SessionAuthenticationModule, XXX.Security.IdentityModel" preCondition="managedHandler" /&gt;
  &lt;/modules&gt;
  &lt;validation validateIntegratedModeConfiguration="false" /&gt;
  &lt;handlers accessPolicy="Read, Execute, Script" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have tried &amp; tried &amp; tried. For months. So I have been stuck on VS2012 because of it. What do you guys think? I really appreciate any input.</p>