1

all,

Just wanted to add to the body of knowledge. I was confounded, trying many solutions, when I couldn't add a controller to just one MVC project. I was getting the error:

There was an error running the selected code generator:
'The parameter is incorrect [...] '

Answer below...

2
  • 4
    Thank you for this. The question would be even better if you expanded it to match the site format by separating the question and answer. Self answers are acceptable (and encouraged!), and are much clearer than a question with the answer in the body. Commented May 16, 2016 at 1:13
  • Thanks, I've edited it that way Commented May 17, 2016 at 12:55

3 Answers 3

1

It turned out to be very obvious, but since it wasted my time, here you go:

I had saved my web.config file using Save as... to another location as a backup before making changes. The project was tracking the saved copy instead of the one in the project. It looked the same in the Solution Explorer, of course. Remove, add existing, et voila.

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

Comments

0

I solved this by Excluding the Web.Config from the project and then Including it in the project

Comments

0

It's a simple close your web.config file(or any system file) and try again. It will work.

Comments

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.