asp.net core targeting full framework #895

Closed
opened 2025-08-09 17:18:05 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @waynebrantley on 3/25/2017

Taking your sample reactreduxspa, simply change the target to net461 and run it.
When the UseWebpackMiddleWare call is made you will get an error:

FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
 

Evidentialy you are in good company as EF had this issue (https://github.com/aspnet/EntityFramework/issues/7889) and it seems core team has /is trying to fix https://github.com/dotnet/corefx/issues/15031

Anyway to fix this on your side or any ideas? Not sure exactly which dependency you are using that is causing this issue.

Tried assembly binding in web.config to no avail:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>  
*Originally created by @waynebrantley on 3/25/2017* Taking your sample reactreduxspa, simply change the target to net461 and run it. When the UseWebpackMiddleWare call is made you will get an error: ``` FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ``` Evidentialy you are in good company as EF had this issue (https://github.com/aspnet/EntityFramework/issues/7889) and it seems core team has /is trying to fix https://github.com/dotnet/corefx/issues/15031 Anyway to fix this on your side or any ideas? Not sure exactly which dependency you are using that is causing this issue. Tried assembly binding in web.config to no avail: ``` <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#895
No description provided.