0

Completely stuck, bemused and flabbergasted here. We have three main PCs in the office, a test PC and also have the remote login PC. ALL of them are getting the same issue and we have no idea.

We suddenly can't do anything that involves auto code generation. If we try to add a controller with views with example, we get the error:

There was an error running the selected code generator:
There was an error getting the type... Try rebuilding project'

This happens in every single machine, including one that has never had Visual Studio installed on it before.

We've tried uninstalling, reinstalling, building 100s of times, checking for updates that may have installed for visual studio etc. We can't find anything that may have caused it.

We've been running visual Studio 2013 update four completely fine since around December. This is in ASP.net MVC using Entity Framework

Some help would be HUGELY appreciated

AmenoB
  • 63
  • 9
  • Did you recently upgrade to Visual studio 2013? – Dai Bok Mar 25 '15 at 15:11
  • Try this http://stackoverflow.com/a/23408072/440611 – Stan Mar 25 '15 at 15:12
  • @DaiBok The only "recent" upgrade as it were was Update 4, but that was when it came out, no issues till today. – AmenoB Mar 25 '15 at 15:13
  • @Steve Tried that already, no luck – AmenoB Mar 25 '15 at 15:13
  • Also, I should point out that this happens on ANY project on ANY machine. New projects give the same error as the project we're working with. Forgot to mention that, sorry – AmenoB Mar 25 '15 at 15:18
  • Is entity framework connection string correct? – Stan Mar 25 '15 at 15:43
  • It hasn't been changed, at least not to my knowledge. But the fact it happens in new projects leads me to believe it's not anything to do with a specific project. – AmenoB Mar 25 '15 at 15:50
  • Could GAC caching or show copy issues be causing this? Its reminds me of something similar with upgrading to mvcweb.dll – Dai Bok Mar 25 '15 at 16:32
  • Rather bemused, but I also have this error at home.. Likely to be a Windows update of some sort? – AmenoB Mar 25 '15 at 18:55
  • I had a problem with nuget update a while back, while we where moving form vs2010 to vs2012 – Dai Bok Mar 27 '15 at 14:33
  • Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not"! –  Apr 21 '15 at 10:33

2 Answers2

0

This worked for me:

-Open your working project folder.
-Delete the BIN folder
-Delete OBJ folder
-Clean Solution, Rebuild Solution and try to Add Controller
Chris Goodman
  • 161
  • 2
  • 12
-1

Forgot I'd posted this! But for what it's worth to other people, it's to do with processors and settings in Visual Studio being different to each other.

Visual Studio MVC Platforms - x86 and x64?

See the link above for the solution

Community
  • 1
  • 1
AmenoB
  • 63
  • 9
  • Having the exact same issue - But this happens ALL THE TIME, i dont even run the application. IIS is not running at all. And if it were to run, it uses IIS express. I created countless new applications with different settings just to see if i could get this to work without any success. – Christer Feb 17 '16 at 22:43