[.NET Core 3.0] HTTP 500.0 - ANCM In-Process Handler Load Failure
See original GitHub issueThe symptom is similar to the OP’s issue in #6111. However, CODE circumstances are mightily different.
Here is what I did:
Visual Studio 16.1.0 Preview 2.0 > Created a brand new ASP.NET Core Web application. On the Template selection screen, I selected “Empty”, let it configure HTTPS and No Authentication.
Once the project was ready in VS, I simply hit F5. The resulting webpage showed the HTTP 500.0 ANCM In-Process Handler Load Failure error, and a Google search led me to #6111.
I don’t have a web/other config file like the OP in 6111.
Reading through the other thread, I made the following notes:
- VS configured my project to build as a “Console Application”. So this generated the following files in the bin/debug/netcoreapp3.0 folder:
WebApplication1.dll
WebApplication1.exe
WebApplication1.pdb
WebApplication1.deps.json
WebApplication1.runtimeconfig.dev.json
WebApplication1.runtimeconfig.json
- When I ran
dotnet WebApplication1
from a command prompt, I was told:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-WebApplication1 does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
- For
dotnet WebApplication1.exe
, I got:
Error:
An assembly specified in the application dependencies manifest (WebApplication1.deps.json) has already been found but with a different file extension:
package: 'WebApplication1', version: '1.0.0'
path: 'WebApplication1.dll'
previously found assembly: 'D:\temp\WebApplication1\bin\Debug\netcoreapp3.0\WebApplication1.exe'
- If I tried to execute the DLL directly, I get:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'D:temp\WebApplication1\bin\Debug\netcoreapp3.0\WebApplication1.dll'. An attempt was made to load a program with an incorrect format.
So I changed the project’s properties to output a Class Library instead of the Console Application EXE. With this, I got:
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'D:\temp\WebApplication1\bin\Debug\netcoreapp3.0\'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the D:\temp\WebApplication1\bin\Debug\netcoreapp3.0\WebApplication1.runtimeconfig.json file specifying the appropriate framework.
I literally have not changed a single line of code or text anywhere in this template-built project. What’s wrong with it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
I shall do this later today or tomorrow. .NET Core isn’t a priority for me. I was only trying it out post the announcements made at //build.
Closing this as we haven’t heard from you and generally close issues with no response after ~7 days. Please feel free to comment if you’re able to get the information we’re looking for and we can reopen the issue to investigate further!