Hi All,
Thanks in advance.
After publishing my application to folder I can no longer Run/Debug MyProjectName.Web.Mvc Document: https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Deployment-Mvc-Core-IIS
Could anyone please give some insight onto what happened and how to fix ? I did not change any build configuration and it was working prior to publishing.
If I run 'dotnet run' via terminal from inside the MyProjectName.Web.Mvc the application launches.
Version: ANZ 8.2.1 Type: net core / jquery
IDE: Rider .NET Core: 3.1.2
"C:\Program Files\dotnet\dotnet.exe" C:/Users/x/source/MyProjectName/src/MyProjectName.Web.Core/bin/Debug/netcoreapp3.1/MyProjectName.Web.Core.dll
A fatal error was encountered. The library 'hostpolicy.dll' required to execute
the application was not found in 'C:\Users\x\source\MyProjectName\src\MyProjectName.Web.Co
re\bin\Debug\netcoreapp3.1\'.
Failed to run as a self-contained app. If this should be a framework-dependent a
pp, add the C:\Users\x\source\MyProjectName\src\MyProjectName.Web.Core\bin\Debug\netcoreap
p3.1\MyProjectName.Web.Core.runtimeconfig.json file specifying the appropriate framewor
k.
Process finished with exit code -2,147,450,749.
3 Answer(s)
-
0
Are you using self-contained?
-
0
i dont remember ever having to choose when initially downloading and starting, what is the default that aspnetzero comes with and how do i check and fix if i am ?
-
0
Failed to run as a self-contained app. If this should be a framework-dependent app
Maybe related: https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained