0

I have now build a webpage for some API stuff- I now want to use the index.cshtml file (which is build into the structure) - but when I open the index.cshtml file or the Layout.cshtml or the Error.cshtml file in the Visual Studio - I get the exception message as:

CS1980 C# Cannot define a class or member that utilizes 'dynamic' because the compiler required type 'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you missing a reference?

For some time ago, the Azure was installed in my project by a mistake - but I uninstalled it (maybe that was the reason).

Prashant Pimpale
  • 10,349
  • 9
  • 44
  • 84
  • Try running Visual Studio without any extensions. If that doesn't help, try repairing you visual studio installation. – Neil Jul 15 '18 at 15:08
  • Hi Neil. Thanks for you answer - how do I run the VS without extensions? – user3212946 Jul 15 '18 at 15:11
  • Try this answer: https://stackoverflow.com/questions/4182471/how-to-run-visual-studio-without-plugin-and-all-third-party-feature – Neil Jul 15 '18 at 15:13
  • Hi Neil - thanks again. I run VS in safemode through the command line - and you are right - no error code - what do you think I have to do? – user3212946 Jul 15 '18 at 15:21
  • Disable all your extensions, and then re-enable them one by one until one of them stops it working. – Neil Jul 15 '18 at 15:24
  • Hi Neil. I have tried to disable all the extensions now. But with no success. I have also tried to compare it to an older project (looks like this project) which is working, and also with the same extensions - but no success. I hope you still are here... – user3212946 Jul 15 '18 at 16:17
  • http://billwg.blogspot.com/2008/12/useful-commands-for-solving-visual.html – Neil Jul 15 '18 at 16:33

1 Answers1

0

I have deleted the View folder (where the index file was included) and added the it again, like on this video.

double-beep
  • 5,031
  • 17
  • 33
  • 41