Hi,
I have IdentityServer4 running fine on netcoreapp1.1 but I need some to reference some assemblies that aren't Core compatible. When I switch to net461 I get the following error, does anyone know how to resolve this?
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Http.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.AspNetCore.Http.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.VisualStudio.Web.BrowserLink.Runtime.BrowserLinkMiddleware.AddPageExecutionListenerFeatureTo(HttpContext context, String requestId)
at Microsoft.VisualStudio.Web.BrowserLink.Runtime.BrowserLinkMiddleware.<ExecuteWithFilter>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext()
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.AspNetCore.Http.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
(Fully-specified)
LOG: Appbase = file:///C:/TFS/Subs Rate/Main/SubsRateSolution/IdServer2/bin/Debug/net461/win7-x64/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\TFS\Subs Rate\Main\SubsRateSolution\IdServer2\bin\Debug\net461\win7-x64\IdServer2.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.AspNetCore.Http.Features, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Attempting download of new URL file:///C:/TFS/Subs Rate/Main/SubsRateSolution/IdServer2/bin/Debug/net461/win7-x64/Microsoft.AspNetCore.Http.Features.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Same issue. Repro steps: New Asp.net core/.net 4.6.1 project. Update Nuget packages. Run.
The issue is with BrowserLink not finding the AspNetCore.Http.Features dependency. As a workaround, you can comment out the app.AddBrowserLink() in the Configure method of your Startup.cs
All set? Can we close?
Yeah, it's unrelated to Id server
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Same issue. Repro steps: New Asp.net core/.net 4.6.1 project. Update Nuget packages. Run.
The issue is with BrowserLink not finding the AspNetCore.Http.Features dependency. As a workaround, you can comment out the
app.AddBrowserLink()in theConfiguremethod of yourStartup.cs