Azure Web Apps 部署失败,因为它无法检测到已经存在的程序集
Azure Web Apps deployment fails as it cannot detect an assembly which is already there
通过 VS 2019 在 Azure Web 应用程序上部署我的 Web-API 应用程序。
在 /wwwroot 文件夹下启用登录 web.config。
出现以下错误:
Error: An assembly specified in the application dependencies
manifest (BuildingBlock.LearningManagement.Category.Api.deps.json) was
not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the
application was published using the following target manifest files:
aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml
据我了解,它找不到 BuildingBlock.LearningManagement.Category.Api.deps.json 文件,但我在 wwwroot 下检查过,它在那里。
Kudu Terminal Screenshot
尝试了this link中建议的一些解决方案,错误仍然存在。
我找到了以下解决方案:
将 属性 组添加到您的 csproj 文件:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
这对我来说很好。
通过 VS 2019 在 Azure Web 应用程序上部署我的 Web-API 应用程序。
在 /wwwroot 文件夹下启用登录 web.config。
Error: An assembly specified in the application dependencies manifest (BuildingBlock.LearningManagement.Category.Api.deps.json) was not found: package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1' path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml
据我了解,它找不到 BuildingBlock.LearningManagement.Category.Api.deps.json 文件,但我在 wwwroot 下检查过,它在那里。 Kudu Terminal Screenshot
尝试了this link中建议的一些解决方案,错误仍然存在。
我找到了以下解决方案: 将 属性 组添加到您的 csproj 文件:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
这对我来说很好。