1

I'm trying to add a controller in visual studio 2019 and it throws the following error : enter image description here

can anyone help me with this ?

Shiwa
  • 101
  • 1
  • 12
  • That's strange. Are you perhaps using some kind of exotic name for the controller? – Steven Lemmens Aug 20 '19 at 09:48
  • Or an exotic plugin? (It's complaining about a code generator) –  Aug 20 '19 at 09:50
  • @StevenLemmens no. whatever name i give, it throws the same error. – Shiwa Aug 20 '19 at 09:52
  • @JᴀʏMᴇᴇ no man. i haven't used any plugin. – Shiwa Aug 20 '19 at 09:52
  • Are you trying to scaffold when making the new controller? – Fabulous Aug 20 '19 at 09:53
  • @Fabulous no, I'm choosing empty mvc controller. – Shiwa Aug 20 '19 at 09:55
  • 1
    OP - if you can head over to event viewer and get the stacktrace that might help? Also, I hate to say this, turn it off and on again (VS), it can get itself in a state sometimes. –  Aug 20 '19 at 09:55
  • 1
    https://stackoverflow.com/questions/19920837/there-was-an-error-running-the-selected-code-generator-in-vs-2013-scaffolding multitude of different suggestions there. All seem to elude to the idea that it's not actually the new controller, it's a problem elsewhere with either platform mismatches or config/proj XML. –  Aug 20 '19 at 09:57
  • 1
    @JᴀʏMᴇᴇ nah, that didn't help either. anyways i created a fresh new project. couldn't solve that. – Shiwa Aug 20 '19 at 10:11
  • @Shiwa the only time I've had issues with the new controller dialogue it mentions scaffolding issues when I'm doing demos. As a result, I always create controllers by adding a new class to the folder which is essentially giving you an empty controller – Fabulous Aug 20 '19 at 10:14

0 Answers0