Tag Archives: visual studio

Visual Studio copy, paste & freeze

The problem

After I installed Visual Studio 2010 I started experiencing that the IDE would freeze for 20+ seconds after I pasted a code snipped in markup edit mode. I had the same issue on my home computer also running Visual Studio 2010.

As you may suspect this became a bit frustrating quite fast.

Fumbling in the dark

I found some MS post suggesting re-installing Visual Studio / Windows or whatever but really, who would do that, really?

Also some MS people suggested that the issue may be not enough RAM for the copy paste operation. Since I have 4GB on both computers and monitoring the memory usage during copy paste at ~2GB it did not really feel like the culprit in this case.

I did find some promising theories out there, like add an exception to your antivirus not to scan your project files – did not work.

Maybe uninstalling Microsoft Visual Studio Web Authoring Component? Seemed like a good idea in general since its just some Frontpage crap – but didn’t help much.

I did find a hotfix from Microsoft with the description (Patch Available for Cut or Copy displaying “insufficient memory” error in VS 2010) not quite my scenario but hey, they seemed related so I installed it, took a long time - did nothing.

The solution

By this time I was quite fed up with this shit, I could not get any real work done with Visual Studio behaving like this. So I started looking at warnings and stuff and did find that there was a typo in the web.config in a sectiongroup.

<configuration>
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScrpingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
       ...
      </sectionGroup>
    </sectionGroup>
  </configSections>
</configuration>

The sectionGroup “scripting” had a typo in in its type attribute, “ScrpingSectionGroup” instead of “ScriptingSectionGroup”.

After I had corrected this everything worked fine.

I had no idea that a typo in web.config could screw up the IDE so bad. Keep in mind that even that web.config had this typo, the project compiled and ran just fine.

Sigh