Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could not copy temporary files to the output directory.

Status
Not open for further replies.

JasonNevin

Programmer
May 26, 2005
29
GB
All of a sudden I've started to get the following error;

Could not copy temporary files to the output directory.

followed by

The file 'bin\MyApp.dll' cannot be copied to the run directory. The process cannot access the file because it is being used by another process.

I've found several solutions in various places but none seem to fix the problem.

I am using VB .net 2003 standard with .net framework 1.1 SP 1.

I list what I have tried already;

Causes;

Root directory on IIS contatins a trailing backslash - it doesn't.

Index services is switched on - it isn't.

More than one project in a solution using directory - only one project in my solution.

More than one solution using same directory - only one solution.

Microsoft suggest applying the latest SP for .net framework which I believe I already have (SP1).

VS is the only thing running on my machine.

This is driving me up the wall because I can't move on until its fixed and its already cost me over a day's development trying to fix it.

I'd be so grateful if someone could help.

Cheers.

 
Have you got any anti-virus software running?

Have you tried re-starting IIS and Visual Studio?

Rhys

"Vampireware /n/,a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

"I see dead pixels!
 
There is anti-virus on the server but not on my laptop. I've tried both.

Cheers.
 
You don't say when you actually get this error? i.e. is it on a particular page? On a particular sub? When starting a project? When creating a setup project? When deploying the application?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Another link for you to check out then I guess...

KB311491


Which machine is IIS running on where you're developing?

Rhys

"Vampireware /n/,a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

"I see dead pixels!
 
IIS is running on my machine.

I've checked out the link you provided and unfortunately it doesn't seem to help. Only one instance of VS is running and my applicatoin wasn't running.
 
Have you restarted IIS?

Have you checked the ASP.Net Worker Process in task manager after the error occurs, (not while it occurs as the process will be running of course - and it may be worthwhile closing Visual Studio to do this)?

Have you checked the dll isn't marked as read only?

As an alternate query, do you use source safe, or any other form of source control?

Rhys

"Vampireware /n/,a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

"I see dead pixels!
 
The read-only box is not checked it is highlighted. Not sure what that means.

I have restarted IIS.

I have tried killing the aspnet process before compiling.
 
I'd ensure the dll wasn't read only by clicking on the read only check box until it was clear and try again.

Also, do you use source control, (Visual Source Safe?), which could flag code etc. as read only?

Rhys

"Vampireware /n/,a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

"I see dead pixels!
 
I have checked it and applied it but when I look again it is highlighted.

If I'm using SourceSafe I don't know about it.

I've found a painful workaround. If I make my changes to the code and then close the IDE I can delete the contents of the bin directory, start the IDE and build the project. I am implementing alot of changes at the moment so this is not ideal!

The only thing that can be hanging onto the file is the IDE so I really can't see how there can be a problem.
 
Can you replicate the problem on another machine?

Rhys

"Vampireware /n/,a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."

"I see dead pixels!
 
Hi Jason,

I don't think you need to close IDE (Visual Studio .NET) if you want to delete the .dll from bin. Also, try to check if the ASP.NET account has access to your project folder.

HtH.
 
If I don't close the IDE the file won't delete because its in use. ASP.NET must have permissions because it compiles the first time.

Rhys. I haven't tried to replicate this on another machine but will try at some point.
 
It's strange that you'll need to close IDE if you want to delete the assembly (dll). Also, I think when you comply with VS.NET you're using the login account not ASP.NET account. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top