0

When I try to add new controller I'm not able to add, I'm getting error message like

enter image description here

Earlier I have added controller, view. It was working fine but suddenly not able to add controller and view. I'm having four project like model, DAL, Core, Service.

I'm using Visual Studio 2015 asp.net mvc 5.2.3.0 and .net frame work 4.6.1.

halfer
  • 19,824
  • 17
  • 99
  • 186
SENA
  • 119
  • 1
  • 2
  • 16

1 Answers1

0

I also had the same issue long back, and i solved it by doing the following three steps:

As overall, We need to clear the ComponentModelCache, the cache will rebuild next time VS is launched.

Three Steps:

Step 1: Close Visual Studio

Step 2: Delete everything in this folder C:\Users\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

Step 3: Restart Visual Studio

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

Hope this will helps , kindly let me know your thoughts or feedbacks

Thanks Karthik

Karthik Elumalai
  • 1,574
  • 1
  • 11
  • 12
  • Hi Karthik. thank you so much. let me try and get back to you. – SENA May 21 '17 at 13:02
  • My pleasure and Hope you will surely get rid of the problem. – Karthik Elumalai May 22 '17 at 01:17
  • Hi Sena , did you get time to check this, whether it helped or do you had anyother problem? thanks by karthik – Karthik Elumalai May 31 '17 at 02:35
  • Hi machi, sorry for the delay in response. i have tried so many time..i'm getting same problem. c drive my user id folder i have deleted as you mentioned same way and i restarted my system then also i'm getting same error. as of now copy exciting controller and working like that. is there any other way? could you help me? – SENA May 31 '17 at 03:53
  • its ok no problem, then i think you have problem either in webconfig or versioning , try the solutions provided in this link:https://stackoverflow.com/questions/23910162/scaffolding-controller-doesnt-work-with-visual-studio-2013-update-2 hope it will solve your problem. thanks – Karthik Elumalai May 31 '17 at 15:36
  • Hi Karthik, if i have webconfig problem, when try to open new project and create new controller i should work but new project also not working i think i need to re install the visual studio. – SENA Jun 03 '17 at 05:24
  • thanks karthik if i found another solution i will update here. – SENA Jun 04 '17 at 05:57