gpt4 book ai didi

c# - Azure 部署因生成错误而失败

转载 作者:行者123 更新时间:2023-12-03 04:07:22 26 4
gpt4 key购买 nike

我已经尝试将我的 Web 应用程序部署到 azure 两天了。当我将应用程序推送到 github 时,我已经完成了应用程序的编程,并且它在本地正常工作,并且我正在使用我的学生入门计划来部署它。应用程序开始部署,然后失败并出现错误。错误如下

/usr/share/dotnet/sdk/3.0.100/Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Extensions.Identity.Stores". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Administration/SchoolRole.cs(1,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Administration/SchoolUser.cs(1,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Tenancy/TenancyRole.cs(1,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Tenancy/TenancyUser.cs(2,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Administration/SchoolRole.cs(5,31): error CS0246: The type or namespace name 'IdentityRole<>' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Administration/SchoolUser.cs(7,31): error CS0246: The type or namespace name 'IdentityUser' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Tenancy/TenancyRole.cs(5,32): error CS0246: The type or namespace name 'IdentityRole<>' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
Tenancy/TenancyUser.cs(7,32): error CS0246: The type or namespace name 'IdentityUser' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/SchoolManager.Models/SchoolManager.Models.csproj]
1 Warning(s)
8 Error(s)

我现在甚至将主机更改为Azure DevOps,但它仍然向我显示相同的内容。这促使我从头开始重写该应用程序。它在本地运行正常,但当我发布它时,它失败了。

最佳答案

我也遇到了同样的问题。虽然发布 VS 构建失败 - 无法找到依赖的项目引用,但使用发布版本我能够构建解决方案。

对我有用的修复是 -将VS版本更新至16.7.3版本。

此版本的项目构建成功通过,我能够部署包...在早期版本中,我认为依赖解析器存在问题。

关于c# - Azure 部署因生成错误而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59142959/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com