System.Exception: In process hosting is not supported for AspNetCoreModule. Change the AspNetCoreModule to at least AspNetCoreModuleV2.
在 Microsoft.NET.Sdk.Publish.Tasks.WebConfigTransform.SetAspNetCoreHostingModel(String aspNetCoreHostingModelValue, String aspNetCoreModuleName, XElement aspNetCoreElement)
其实提示已经很明显了,就是把AspNetCoreModule改为AspNetCoreModuleV2.
具体操作:
右击web项目-->编辑项目文件
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<!--<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>-->
<AspNetCoreModuleV2>InProcess</AspNetCoreModuleV2>
</PropertyGroup>
红色部分就是新改的,注释的是原来的.
然后保存重新发布就ok了~~~
以上就是【asp.net core 发布时TransformWebConfig任务意外失败】的全部内容了,欢迎留言评论进行交流!