1

I am working on asp.net mvc project (Programming language: C#) in Visual studio 2019(version: 16.2.2). While creating Controller or view, I am getting this error.enter image description here

Error says "There was an error running the selected code generator: the value -1 is outside the acceptable range of [0, 2147483647]. Parameter name value". I have already tried to find the solution but so far I am not able to fix it. Any help is appreciated. Thanks.

1
  • Before you try and create the controller or view, does the project compile? Commented Aug 22, 2019 at 5:11

1 Answer 1

1

Try clearing the ComponentModelCache, the cache will rebuild next time VS is launched.

  • Close Visual Studio Delete everything in this folder
  • C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
  • Restart Visual Studio

14.0 is for visual studio 2015. This will work for other versions also.

Sign up to request clarification or add additional context in comments.

1 Comment

Build is successful. I have already cleared ComponentModelCache but still I am getting same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.