3

Built a project this morning with VS2019. Decided to upgrade to VS2022 and now the build fails.

Building through VS gives me the Error:

The type or namespace name 'WindowsAzure' does not exist in the namespace 'Microsoft'

When building through the terminal I get a slightly more detailed error.

First this warning

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.

Then the same error.

As mentioned. The only thing that has been changed is the version of Visual Studio.

I also get this second error.

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.
4

1 回答 1

4

By removing all obj and bin folders in the solution. The solution were able to be built again.

于 2021-11-09T12:14:49.027 回答