尝试将我的项目生成为exe文件,但出现错误:
之前:“ dotnet build -r win10-x86”是可以的
运行生成的exe后,也可以:
indows DPAPI to encrypt keys at rest.
Hosting environment: Production
Content root path: C:....\currencyColution\correncyProject\bin\Debug\netcoreapp2.1\win10-x86
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.
Run Code Online (Sandbox Code Playgroud)
在装入页面后,更精确地找不到index.html:
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLG91TC2H0UO", Request id "0HLG91TC2H0UO:00000001": An
unhandled exception was thrown by the application.
System.InvalidOperationException: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no …Run Code Online (Sandbox Code Playgroud)