Friday, January 9, 2009

Global Assembly Cache (GAC) folder suddenly appears empty? Technical problem solved!

A few days ago I was working with Visual Studio and suddenly I was "under attack", a technical problem so persistent that I had to find an immediate solution.

What happened? Suddenly, the Assembly folder (AKA "GAC folder" located at C:\WINDOWS\assembly) appeared empty. In addition, I could not deploy or run any of my web parts.

I restarted my virtual machine, hoping that the assembly folder contents would miraculously reappear after rebooting. That did the trick but it turned out to be a very temporary solution. As I continued working this problem intensified, occurring and greater and greater frequency.
Eventually it happened at intervals of about 10 minutes and it became impossible to continue.

Searching for a more long-lasting solution I came across a forum where many other developers complained about the same problem.

The suggestion I found there was to disable the Indexing Service (located in Start -> Programs -> Administrative Tools -> Services).

I tried this and thankfully it worked! All I had to do is to stop the service in the “services” screen.



Thing is – this service has a knack for “magically” restarting itself every now and then, so if you want to make sure you've gotten rid of it for good – I suggest also changing its start-up type to “Disabled”.



Since I implemented these changes on my computer everything has returned to normal and I've been able to work in Visual Studio freely and easily.

Hope this helps,
Shai Petel

13 comments:

Anonymous said...

Great. It worked, Very useful info

Anonymous said...

oh god, you are a life saver !!!!!

B1ju said...

Very useful piece of information

-biju

Anonymous said...

awesome! I'm put up with the disappearing act of the GAC for far to long. Seems to only happen when its SP development and inside a VPC. So strange!

Fix worked perfectly!

Prasad said...

Very thnx , awesome!!!
this tip saved my day.

Prasad said...

Very thanks
this tip saved my dsay!

Pranav Shah said...

My Indexing service is already disabled, but i'm still facing the same problem. Help! :(

Pranav Shah said...

My Indexing Service is already disabled, but i'm still in the midst of the same problem. Help!!

Shai Petel said...

Restart helped?

Pranav Shah said...

Nope :(

Pranav Shah said...

Restart helps sometimes, but is there any firm solution to this? Or at least do we know why it occurs?

Please advice. I'm still facing this. :(

Pranav Shah said...

Restart helps sometimes, but is there any firm solution to this? Or at least do we know why it occurs?

Please advice. I'm still facing this. :(

Shai Petel said...

I think after a windows update this problem stopped happening to me.

Make sure you update windows and visual studio components. I know developers don't like to run windows update but it is important and can save a lot of headache.