开发者

Copy and paste Razor markup in Visual Studio 2010 SP1 is extremely slow

开发者 https://www.devze.com 2023-03-23 05:19 出处:网络
Any time I try to paste anything in a CSHTML file that contains Razor markup or targets a line inside a code block - th开发者_高级运维e entire Visual Studio freezes for almost a minute.

Any time I try to paste anything in a CSHTML file that contains Razor markup or targets a line inside a code block - th开发者_高级运维e entire Visual Studio freezes for almost a minute.

I've applied SP1 for Visual Studio. I'm using ASP.NET MVC 3.

I also only have this problem on a single computer so I'm guessing there's some sort of application or version mismatch I'm simply not seeing. I'm running ReSharper and upgraded it to 6.0 to no avail (though the Razor code inspection works and is really nice).

It's only if I paste a line containing Razor markup that the issue occur. I get no errors on the copy operation, and if I'm pasting regular HTML without Razor markup or outside code blocks in the very same file there're no issues whatsoever. No problems pasting in any other kinds of files like .cs or .aspx. Freshly created MVC 3 projects suffer as well as existing old projects.


I resolved this a while ago but I don't recall exactly which component was the issue - but it was either SP1 for Visual Studio that was in fact not RTM (though it wasn't obvious when looking at the about dialog hence the difficulty in figuring out) or, more likely according to my memory, a pre-RTM version of MVC 3 installed, also not obvious at all when looking through the installed components list.

It took some manual work to get all the related components uninstalled, including some registry hacks, before reinstalling the RTM version and then the problem disappeared. I did not have to reinstall Visual Studio or any of my addons.

Hope this helps someone with similar problems, carefully investigate the exact build numbers of the suspected components. They may in fact be pre-RTM :9


Have you tried to reset the Visual Studio settings? I can't promise this will help but I think it would be worth a try (devenv.exe /ResetSettings). If that doesn't help, I think you will have to re-install Visual Studio.

0

精彩评论

暂无评论...
验证码 换一张
取 消