今天早上和VS2019一起构建了一个项目。决定升级到VS2022,现在构建失败了。
通过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.
发布于 2021-11-09 12:14:49
通过移除解决方案中的所有obj和bin文件夹。可以重新构建解决方案。
https://stackoverflow.com/questions/69896869
复制相似问题