Description
Self-contained asp.net core application gives the error “This executable is not bound to a managed DLL to execute”
When I publish my asp.net core application as self-contained I succesfully get the myproject.exe. This exe file doesn't work if I double click on it and doesn't work if I try to run it from the cmd console. The project has been update from .net core 2.0 to 2.2
The exception is:
This executable is not bound to a managed DLL to execute. The binding value is: 'c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2'
A fatal error was encountered. This executable was not bound to load a managed DLL.
I tried to publish throught Visual Studio (using Method: File System - Target Framework: netcoreapp2.2 - Deployment Mode: self-contained - Target Runtime: win-x64) and also throught cmd console "dotnet publish -r win-x64". But I get the same error.
I added a repo to replicate the issue (I removed almost everythings from the project, it contains only the skeleton, but it seems sufficient to replicate the issue) https://github.com/tommy86r/TempProject