[英]Is that possible to publish ASP.Net Core 3.1 web application as a Single File
I know that we are able to publish .Net Core 3.x console applications as a self-contained
, singlefile
.我知道我们能够将 .Net Core 3.x 控制台应用程序作为
self-contained
singlefile
。 But is it possible to publish web application as a single file?但是是否可以将 Web 应用程序发布为单个文件?
I tried to use我试着用
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
But after publishing I've got the error ANCM Application DLL Not Found
.但是发布后我收到错误
ANCM Application DLL Not Found
。 My application is on .Net Core 3.1.1
.我的应用程序在
.Net Core 3.1.1
。
How can I do that?我怎样才能做到这一点?
You should edit your webconfig to look like你应该编辑你的 webconfig 看起来像
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
instead of代替
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.