Cannot open DLL file for writing

G

Guest

Hi all...

I have an ASP.NET 2.0 application. This application uses 2 components, named
Informe.dll and Seguridad.dll, whose source codes are under the same solution
as the ASP.NET application. The application resides on a remote computer
running Windows 2003 Server. My development PC is under Windows XP and Visual
Studio 2005 Beta 2.

When I rebuild the application, or when i modify any DLL, the following
error is shown for both DLL's (or for the modified one):

Error 2 Cannot copy assembly 'Seguridad.dll' to file 'C:\Documents and
Settings\jstuardo\Configuración
local\Temp\VWDWebCache\srv-repsvc_IntranetVida_cartolas\Bin\Seguridad.dll'.
Unable to add 'D:\Proyectos\Visual Studio
2005\Projects\IntranetVida\Security\obj\Debug\Seguridad.dll' to the Web.
Server error: Cannot open file "Seguridad.dll" for writing.


In order to refresh the component, I have to reset my computer.

Any help to solve this problem would be greatly appreciated.

Thanks
Jaime
 
J

jasonkester

2.0, eh? That's too bad. I'd have hoped they would have fixed this by
now.

Basically, you're running into the issue that every Enterprise
developer hits with VS.NET on a daily basis. There is nothing wrong
with your project. You have nothing misconfigured. Your only sin is
that you have multiple .dlls in your project, and one of them has grown
beyond 640k.

VS.NET has a known issue, where it sometimes locks down a large .dll
and refuses to release it, even when it is trying to build a new
version of that .dll or overwrite an old version. There are
workarounds to make this happen less frequently, but no real solution.

Basically, you need to exit VS.NET and delete the content of ALL your
bin directories whenever this happens. I have a script sitting on my
desktop for this purpose, and I imagine thousands of other developers
do too. It's one of many small inconveniences you learn to live with
when developing in the (otherwise) most productive IDE in history.

Good luck!

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top