Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot build after updating to VS 2022

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.
like image 457
Cedervall Avatar asked Oct 22 '25 06:10

Cedervall


1 Answers

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

like image 60
Cedervall Avatar answered Oct 24 '25 19:10

Cedervall



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!