【发布时间】:2021-12-22 02:00:40
【问题描述】:
今天早上用 VS2019 构建了一个项目。决定升级到VS2022,现在build失败了。
通过 VS 构建会出现错误:
The type or namespace name 'WindowsAzure' does not exist in the namespace 'Microsoft'
当通过终端构建时,我得到一个更详细的错误。
首先是这个警告
C:\Program Files\dotnet\sdk\6.0.100\Microsoft.Common.CurrentVersion.targets(2304,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.WindowsAzure.Storage". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
然后同样的错误。
如前所述。唯一改变的是 Visual Studio 的版本。
我也遇到了第二个错误。
error MSB4019: The imported project "C:\Program Files\dotnet\sdk\6.0.100\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\6.0.100\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" is correct, and that the file exists on disk.
【问题讨论】: