Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Files cannot be copied to run directory"

1 view
Skip to first unread message

Melissa Whalen

unread,
Dec 31, 2001, 1:59:53 PM12/31/01
to
I have a compile error in my asp.net project that I'm not sure how to fix.
I can run my project after booting-up with no problem, it compiles and runs
fine. But then when I stop it and try to run it again, I get a compile
error:

"Could not copy temporary files to the output directory.
The file 'bin\UserPages.dll' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process.
The file 'bin\UserPages.pdb' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process."

I have found that there's a process running that won't stop when the project
is stopped (should it be stopped?). The name of the process is:
aspnet_wp.exe
If I go to the Debug menu then click Processes... I find it there. I then
highlight it, click on the Attach... button to the right, check the Common
Language Runtime checkbox then click OK. So when I get back to the
Processes window, it's listed below in the Debugged Process window and if I
click the Terminate button to the right, I can build and run my project
again. I shouldn't have to do this every time I want to run the project.
And now it's getting worse - even if I stop the process I still get a
compile error from the .pdb file. Similar to above it displays:

"Could not copy temporary files to the output directory.
The file 'bin\UserPages.pdb' cannot be copied to the run directory. The
process cannot access the file because it is being used by another process."

I understand the nature of the error and what the error message means, but
I'm not sure how to fix it. The only thing I can do to get the project to
run is re-boot my system. I don't know if anyone else has encountered
anything like this, but I'd really appreciate it if anyone has any info
about this.

--
Melissa Whalen, BBA/IS, AIT
VS Visual Statement


Micah Nasarow

unread,
Dec 31, 2001, 3:01:41 PM12/31/01
to
Melissa,

I have seen this error as well or possible similar one (i cant remember the
exact error msg). I do not know what the cause is. Myself an my other team
developer have come up with some theories.

I have noticed that we get the error if we have multiple IDEs open
refrencing the same projects.

I have noticed that sometimes if a build a solution possibly in the wrong
order (or something) I get the error, as well as the problem project
becomes de-referened in my other projects that reference the now problematic
project.

The quick-fix that we have discovered, that as far as I have seen, causes no
problems is to rename the xx.pdb file to xx.pdbold (or something)

recompile and things should work. We use VSS so I wipe out my entire dev
box directory quite a bit and rebuild a new structure from VSS daily. So
this helps keep things in check.

I have not seen this error in a while, maybe we changed code that was
causing the error..maybe the fact that I try not to have too many VS IDEs
open..??? I am not sure.

Good luck

Micah Nasarow
Software Design Engineer
Opus-i


"Melissa Whalen" <mwh...@visualstatement.com> wrote in message
news:#un9f1ikBHA.1688@tkmsftngp03...

A Gill

unread,
Dec 31, 2001, 3:21:57 PM12/31/01
to

Hi Melissa, I'm not sure what's going on exactly. But take a look at the
UserPages.dll project files and ensure you have no errors in the project.
There could be a slight possibly that another project is trying to reference
the UserPages.dll in your solution and is causing the error.

Hope this helps.

Amer


"Melissa Whalen" <mwh...@visualstatement.com> wrote in message
news:#un9f1ikBHA.1688@tkmsftngp03...

A Gill

unread,
Dec 31, 2001, 5:18:18 PM12/31/01
to

Another possible problem can be that your IE browser is working offline.


"A Gill" <am...@championsway.com> wrote in message
news:uxX2#qjkBHA.1516@tkmsftngp07...

Melissa Whalen

unread,
Dec 31, 2001, 5:19:54 PM12/31/01
to
Micah,

Thanks for the reply. Your advice made me decide to search deeper through
my system to find the .pdb file and I ended up find f separate instances of
the .pdb and .dll files. This doesn't seem quite right to me, especially
since they're more or less piled on top of each other...
ex. the path to the main one is: c:\inetpub\wwwroot\myProject\bin
the path to another is: c:\Documents and Settings\System
User\VSWebCache\MachineName\myProject\obj\debug
the next one is in: c:\Documents and Settings\System
User\VSWebCache\MachineName\myProject\obj\debug\temp
the next one is in: c:\Documents and Settings\System
User\VSWebCache\MachineName\myProject\obj\debug\temp\_vti_cnf
another is in: c:\Documents and Settings\System
User\VSWebCache\MachineName\myProject\obj\debug\_vti_cnf

Should there be that many? Is there one or more that I can get rid of to
get my project working properly again? Any help/advice is appreciated.
Thanks in advance.

Melissa

"Micah Nasarow" <mic...@opus-i.com> wrote in message
news:OLz$3ZjkBHA.460@tkmsftngp04...

0 new messages