Error when GAC-ing assembly
This was a bit unexpected (but very easy to figure out)-
I've tried to replace an assembly in the GAC the other day by dragging the dll file into the Windows\Assembly folder when I got the following error:
Strange - I thought - sure the file exists, I'm trying to replace an existing one, as I (and every BizTalk developer, I'm sure) do so many times without a problem.
After playing around for a second or two the answer was found - we had a command line window in that assembly's GAC folder. closing that window (or moving to another folder) allowed me to succesfully add the assembly to the GAC.
I don't really know, but I suspect GACUtil tries to recreate the folder when you GAC an assembly and having the CMD window in that folder did not allow it to be removed (and re-created)
And what was I doing there in the first place? Thats very simple - thats my way of adding pdb's to the GAC to allow debugging remotely...
I've tried to replace an assembly in the GAC the other day by dragging the dll file into the Windows\Assembly folder when I got the following error:
Right, I've said, must be the explorer view, so I quickly opened VS Command Line and used GacUtil /i only to receive the same error. adding /f did not help.Failure adding assembly to the cache: Cannot create a file when
that file already exists
Strange - I thought - sure the file exists, I'm trying to replace an existing one, as I (and every BizTalk developer, I'm sure) do so many times without a problem.
After playing around for a second or two the answer was found - we had a command line window in that assembly's GAC folder. closing that window (or moving to another folder) allowed me to succesfully add the assembly to the GAC.
I don't really know, but I suspect GACUtil tries to recreate the folder when you GAC an assembly and having the CMD window in that folder did not allow it to be removed (and re-created)
And what was I doing there in the first place? Thats very simple - thats my way of adding pdb's to the GAC to allow debugging remotely...



2 Comments:
That is exactly the solution for the problem I was :) having.
By
Anonymous, at 21/07/08 16:13
thanks. this happened to me as well, and this tip helped!
By
Dexter Legaspi, at 18/08/08 21:18
Post a Comment
<< Home