'Failing to compile ASP.NET Web API with MSBuild giving a MSB3021 error
enter code here
enter image description here
I'm having a problem when trying to compile and build an ASP.NET Web API project targeting .NET6.0. For some reason MSBuild is failing with the given error. I tried to change the access permissions for both /obj and /bin folders but I'm still getting the same error. However, this only happens when I try to build the project in a Debug mode, and it's working perfectly fine in Release mode. Any help would be highly appreciated!
Solution 1:[1]
Searching in the other stackoverflow questions (the same issue for net core 6 razor pages), it seems that deleting the bin and obj folders, and rebuilding your solution works. And also restarting your computer seems to work. I still have this issue even though i have tried both solutions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Manuel Sandoval |