Attempting to install DLL to GAC

D

Dylan Parry

Hi,

I’ve got a DLL file that is currently installed in the GAC. Occasionally
I have to update the DLL for bug fixes etc, and what I normally do is
overwrite the existing DLL in the GAC.

This has been working fine for the last few years, but today I suddenly
get an error:

Assembly Cache Viewer - Install Failed
Cannot access file 'Opus.dll' because it is being used by another process.

This happens when I try to install the DLL by dragging it into the
Assembly Viewer. I get a similar error when attempting to do it via the
command line, but with the message "unknown error" rather than being
told it’s used by another process.

I’ve tried rebooting the server and turning off IIS, but neither of
these have any effect.

I have no idea why this is suddenly happening! I’m not aware of anything
having changed on the server. All I know is that it’s seriously annoying
and it’s stopping me from fixing a really annoying bug that I really
need to fix asap :(

Anyone got any clues as to what’s going on here?

Cheers,
 
A

Andrew Morton

Dylan said:
I've got a DLL file that is currently installed in the GAC.
Occasionally I have to update the DLL for bug fixes etc, and what I
normally do is overwrite the existing DLL in the GAC.

This has been working fine for the last few years, but today I
suddenly get an error:

Assembly Cache Viewer - Install Failed
Cannot access file 'Opus.dll' because it is being used by another
process.

This happens when I try to install the DLL by dragging it into the
Assembly Viewer. I get a similar error when attempting to do it via
the command line, but with the message "unknown error" rather than
being
told it's used by another process.

I've tried rebooting the server and turning off IIS, but neither of
these have any effect.

I have no idea why this is suddenly happening! I'm not aware of
anything having changed on the server. All I know is that it's
seriously annoying and it's stopping me from fixing a really annoying
bug that I really
need to fix asap :(

If you need it done asap rather than trying to find the root problem, have
you tried replacing the file in safe mode (as in press F8 when booting)?

Andrew
 
D

Dylan Parry

Andrew said:
If you need it done asap rather than trying to find the root problem, have
you tried replacing the file in safe mode (as in press F8 when booting)?

Unfortunately not an option as the server is on the other side of the
country in a data centre where I can’t get to it to press any buttons
when it’s booting :(
 
A

Andrew Morton

Dylan said:
Thanks, but didn't work :( I found two open handles to the file, and
closed them both, but still get the same error when trying to update
the GAC.

It might be that when you closed the handles, whatever had them open noticed
and re-opened them after a short time. However...
http://www.google.com/#hl=en&source=hp&q=windows+delete+file+on+reboot

Although it is somewhat in the realm of it might break something on your
server if something is that desperate to get a handle to the dll.

Andrew
 
G

Gregory A. Beamer

Iƒ Tve got a DLL file that is currently installed in the GAC.
Occasionally I have to update the DLL for bug fixes etc, and what I
normally do is overwrite the existing DLL in the GAC.

This has been working fine for the last few years, but today I
suddenly get an error:

Assembly Cache Viewer - Install Failed
Cannot access file 'Opus.dll' because it is being used by another
process.

This happens when I try to install the DLL by dragging it into the
Assembly Viewer. I get a similar error when attempting to do it via
the command line, but with the message "unknown error" rather than
being told itƒ Ts used by another process.

Iƒ Tve tried rebooting the server and turning off IIS, but neither of
these have any effect.

I have no idea why this is suddenly happening! Iƒ Tm not aware of
anything having changed on the server. All I know is that itƒ Ts
seriously annoying and itƒ Ts stopping me from fixing a really
annoying bug that I really need to fix asap :(

Anyone got any clues as to whatƒ Ts going on here?

Can you version the DLL so it can be installed side by side. When the
next application hits, it should hit the newer version, unless you have
registered a specific version, and you should then be able to delete the
older version.

This may not be an option for you, but if it is, it is a hell of a lot
easier than making sure 100% of all processes that might be using the
DLL are stopped.

If you must bang through, try something like Process Explorer or other
tools (install on server) and find out what is using the assembly and
locking it.

Peace and Grace,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top