Copying and pasting Razor markup in Visual Studio 2010 SP1 is extremely slow

Whenever I try to insert something into a CSHTML file containing Razor markup or aimed at a line inside a block of code, the entire Visual Studio freezes for almost a minute.

I applied SP1 for Visual Studio. I am using ASP.NET MVC 3.

I also have this problem on only one computer, so I assume that there is some kind of mismatch of the application or version that I just cannot see. I run ReSharper and updated it to 6.0 to no avail (although the Razor code check works and is really good).

It is only if I insert a line containing the Razor markup that the problem occurs. I do not get errors in the copy operation, and if I embed plain HTML without Razor markup or external blocks of code in the same file, there are no problems. No problem when pasting into any other files like .cs or .aspx. The newly created MVC 3 projects suffer as well as existing old projects.

+7
source share
2 answers

I solved this some time ago, but I don’t remember which component was the problem, but it was either Visual Studio SP1, which really was not RTM (although it was not obvious when viewing the dialog box the difficulty in determining) or, which is more likely, according to my memory, the RTM version of MVC 3 is also not obvious when viewing the list of installed components.

It took some manual work to restore all related components, including some registry hacks, before reinstalling the RTM version, and then the problem disappeared. I did not need to reinstall Visual Studio or any of my add-ons.

Hope this helps someone with similar problems, carefully study the exact assembly numbers of the suspected components. In fact, they can be up to RTM: 9

0
source

Have you tried to reset settings in Visual Studio? I cannot promise that this will help, but I think it is worth a try ( devenv.exe /ResetSettings ). If this does not help, I think you will have to reinstall Visual Studio.

-one
source

All Articles