2010

You are browsing the site archives for 2010.

For quite some time now, it has happened to me occasionally that attaching the debugger to the w3wp.exe (IIS worker process) to debug a web application gets extremely slow. I’m talking about several minutes to load all the symbols before it could actually start debugging. In the VS status bar you could see that it took about 1 second for each assembly to load – and we’ve got LOTs of them. In the past, the problem usually went away by itself after a reboot or some other Windows “feature”. This week however it just didn’t get any better. After some Googleing I now think that I have found the solution to the problem: simply delete ALL breakpoints and set a couple of new ones. Don’t ask me how or why exactly, but it seems to be quite reliable.

I often get an Not enough storage is available to complete this operation Error when compiling a large Solution. By storage they mean Memory (RAM) in fact.
Visual Studio is limited by how much RAM it will use but theres a trick to increase the Memory it will use.

Quick HowTo:
1.
Windows xp: backup the boot.ini file and then put the /3gb switch in your boot.ini.
Windows Vista: run the following from the visual studio command prompt:
bcdedit /set increaseuserva 3072

2.
– be sure to backup devenv.exe
– using the visual studio command prompt, navigate to c:\program files\microsoft visual studio 9\common7\ide\
– execute the following command:
editbin /largeaddressaware devenv.exe

Here’s the Link to the original entry:

http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx

To install Windows 7 on a virtual disk, follow these instructions.

  • Boot from the Windows 7 installation disc
  • Press SHIFT+F10 to open the command prompt
  • Start diskpart.exe
  • If you already haven’t already created a vdisk that you would like to install Win7 on, create one (see previous post)
  • Attach the virtual disk

    > select vdisk file="C:\path\to\vhd"
    > attach vdisk
    > exit

  • Continue with the installation by selecting “Custom Install”
  • Select the virtual disk (if you have formatted and named your disk, you will see that name now, otherwise you will have to consider the disk size)
  • Install Windows 7

The installer will create a boot menu entry for your new Windows installation and your existing non-virtual installation. Unfortunately, they are (by default) both called “Windows 7”. Very helpful… The virtual installation will be the first entry in your boot menu and started by default. Once your installation is complete, you can fix this issue with the “bcdedit.exe” command line tool.

Open a command prompt as administrator and follow these steps:

> bcdedit.exe

This will give you a list of all boot manager entries. Find the one that refers to your VHD file and copy it’s ID – {current} if you are currently running your virtual installation and usually {default} if you’re running the physical installation.

> bcdedit.exe /set description "New boot menu entry"

You can also create copies of your bood menu entries and adjust them to, let’s say, point to a different VHD file.

There is this fancy new feature in Windows 7 called “Boot from VHD”. It essentially allows you to boot your machine from a virtual disk without having to virtualize the rest of your hardware. This can be quite helpful if you want to experiment with your Win7 without reinstalling all the time because you screwed up.

First I’ll explain how you can create and manage virtual disks. In the second part I will discuss how to install a second Win7 on the created virtual disk and how to set up the bootloader correctly.
Continue reading Win7 Boot from VHD – Part I