Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Application running on NET461 fails with FileLoadException #487
Attempting to get the sample running works for a .NET CORE app but fails in NET461.
When running a very simple page that contains
The application will fail with:
Removing the asp-prerender-module attribute and refreshing the page and everything runs just fine.
@MarkPieszak That's not correct - the NodeServices/SpaServices packages should work completely on .NET Framework 4.5.1 and later (as well as .NET Core). It requires ASP.NET Core (not classic ASP.NET), but ASP.NET Core (the application framework) can run on both .NET Core and .NET Framework 4.5.1+ (the runtime platform). I know the naming is very tricky, so I can understand the confusion!
@lruckman Sorry for the inconvenience. I can repro the issue and am trying to track down what's going on with that. What I've determined so far is that:
My guess is that the underlying cause is something similar to (if not the same as) aspnet/Security#1046.
In the short term, one workaround is to downgrade to
referenced this issue
Feb 8, 2017
@SteveSanderson i have the same issue in an WPF (.netframework 4.6.2) project when using code of a .NETStandard1.4 library which uses
I assume it is related to this issue? Is there a workaround for this?
I see my previous comment had the xml suppressed. You need to add the reference to the first
<ItemGroup> <!--Force new version of System.Net.Http to workaround issue in 4.3.0 with net462, should be able to remove this line soon. Issue is complaint of could not load file or assembly 'System.Diagnostics.DiagnosticSource' --> <PackageReference Include="System.Net.Http" Version="4.3.1" /> <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" /> <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /> <PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0" /> <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /> </ItemGroup>