[Fix] Scaffolding failed. Failed to get Project Context

The problem “Scaffolding failed. Failed to get Project Context” is seen when you are working on asp.net and are trying to create an API controller with the methods in asp.net.

Given below is the snippet of the problem “Scaffolding failed. Failed to get Project Context”, the issue still displays as “Failed to obtain Project Context” even when options are being referenced that don’t exist:

Error: Scaffolding failed. Failed to get Project Context

The problem, “Scaffolding failed. Failed to get Project Context” is seen because of the problem in the ASP code generators tool latest version that is version 3.1.4. To fix the error, ,rollback to version 3.1.3 in your system as this version does not throw an error.

This is an error from the asp team and it will be fixed in the next update

To fix the problem “Scaffolding failed. Failed to get Project Context “, downgrade the dotnet-aspnet-codegenerator from 3.1.4 to 3.1.3 version, then asp application would start work fine.

Additionally, if you launch Xcode and use the pre-selected runtime tools (in my case, MacOS and iOS), clang should function normally.

Steps to Fix the problem “Scaffolding failed. Failed to get Project Context”:

To fix your error, you will have to change dotnet-aspnet-codegenerator from 3.1.4 to 3.1.3 , then the asp application works fine in the system.

This should help you fix and understand the problem, “Scaffolding failed. Failed to get Project Context”.

Conclusion

To fix the problem “Scaffolding failed. Failed to get Project Context “, you will have to change dotnet-aspnet-codegenerator from 3.1.4 to 3.1.3 , then it asp application works fine in the system.