Error of the Day: “Cannot Add the Specified Assembly to the GAC”

I’ve been fighting a bit with visual studio 2010 on a an sp2010 solution and was getting this error:

Error occurred in deployment step ‘Add Solution’: Error: Cannot add the specified assembly to the global assembly cache: YourAwesomeDLLThat IAmJustNotGoingToInstallRightNow.dll

I went to the GAC itself (c:\windows\assembly) to try and remove and got a “file in use” error.

I did an iisreset, I almost downloaded sysinternals, I stopped the timer service in services… finally, I just closed and reopened visual studio itself and I was finally able to close it out.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

2 thoughts on “Error of the Day: “Cannot Add the Specified Assembly to the GAC”

  1. Jonathan

    Hi Paul,

    I commonly encounter this problem, usually because I have opened a command line on c:\windows\assembly\gac_msil\MYDLL_Folder\. Thus gacutil can’t change the dll.

    Might help others…

    ,Jonathan

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *