Sunday, December 05, 2010

Visual Studio 2010 : Unexpected error writing metadata to file '.exe' -- 'Not enough storage is available to complete this operation.'

You might get an error "Unexpected error writing metadata to file '.exe' - 'Not enough storage is available to complete this operation." when you build with Visual Studio 2010.

Well ,sometime back we had a migration to using Visual Studio Team system from using Source depot. Incidently this was the I was building my app after the migration and setup of VSTS. When trying build the app, I was getting the above error which was delaying my work for almost an entire day. I had sufficient hard disc and memory space - as opposed to what the message said. "Binging" didn't help much.. several sites suggested to re-install VS 2010. However, I was little skeptical in doing a re-install as I was almost for sure knew there was nothing wrong with my VS installation.
I randomly tried several options -luckily one of that fixed the issue. So for anyone else having the same issue - here are the steps - which you may want to try, if your Source control uses VSTS:
 
1. Check the path that contains your Project.
2. In Team explorer, click Source control.
3. In Source control explorer, right click on the folder of your project that gives the above error and click "Remove mapping".
 

4. This removes any connection of that folder of your project with VSTS. This might take a few minutes if your project is large.
5. Create a new folder and map your project to the new folder by taking the latest from TFS.
6. Build your project.
 
This should solve the above issue.
 
Cheers!
 
 

2 comments:

Rajesh Subramanian said...

Sometimes i am getting this error during build..not sure why.. restarting the IDE resolves that issue....

Rajesh Subramanian said...

Good to have this info... Nice article...
Best Regards,
Rajesh