467,915 Members | 1,495 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

"could not write to output file" problem

Today I went to compile a solution I've been working on for months. I've
been off most of the last few months, so there's been a gap in the work, but
I did compile it a few times earlier this week.

Today I get a message:
Could not write to output file
'D:\DevelopmentProjects\Enterprise\CustomUtilities \obj\Debug\CustomUtilities
..dll' -- 'The process cannot access the file because it is being used by
another process. '

I found the KB article 313512
http://support.microsoft.com/default...b;en-us;313512 but it
doesn't seem to apply. I do have one assembly over 64k, but not the one in
the error message. Furthermore, the output paths and Local Copy settings
check out.

I thought I would try just deleting the file manually and recompiling.
Explorer says it can't delete the file. If I exit VS then I can delete the
file. Going back into VS I get a message that it can't find an assembly,
but it compiles ok. But only the first time, after that it's back to that
error message.

Any ideas what is keeping this file locked and how to fix it?
Nov 16 '05 #1
  • viewed: 4198
Share:
3 Replies
If you have 2 version of VS.NET open, where one project is refernecing
another, this can happen. Also, if you have a process manually load up an
assembly, it will get a lock on it.

Would be so useful if that damned message actually gave the name of the
process that has the lock...

"Daniel Billingsley" <dbillingsley@NO_durcon_SPAAMM.com> wrote in message
news:ON*************@TK2MSFTNGP11.phx.gbl...
Today I went to compile a solution I've been working on for months. I've
been off most of the last few months, so there's been a gap in the work, but I did compile it a few times earlier this week.

Today I get a message:
Could not write to output file
'D:\DevelopmentProjects\Enterprise\CustomUtilities \obj\Debug\CustomUtilities .dll' -- 'The process cannot access the file because it is being used by
another process. '

I found the KB article 313512
http://support.microsoft.com/default...b;en-us;313512 but it
doesn't seem to apply. I do have one assembly over 64k, but not the one in the error message. Furthermore, the output paths and Local Copy settings
check out.

I thought I would try just deleting the file manually and recompiling.
Explorer says it can't delete the file. If I exit VS then I can delete the file. Going back into VS I get a message that it can't find an assembly,
but it compiles ok. But only the first time, after that it's back to that
error message.

Any ideas what is keeping this file locked and how to fix it?

Nov 16 '05 #2
No, only one instance open and no manual loading of assemblies. I rebooted
the machine to make sure there was some phantom process locking it and it
still did the same thing.

"Marina" <so*****@nospam.com> wrote in message
news:eg****************@TK2MSFTNGP14.phx.gbl...
If you have 2 version of VS.NET open, where one project is refernecing
another, this can happen. Also, if you have a process manually load up an
assembly, it will get a lock on it.

Would be so useful if that damned message actually gave the name of the
process that has the lock...

Nov 16 '05 #3
Daniel,

Mihaly,

I've had this problem, too, on more than one solution I've built. What
usually works is to remove references of the offending project from the other
projects that rely upon in, build the problem project, and then re-add the
references back to the ones that need it. This normally works, but if it
doesn't, I close down Visual Studio, and proceed to delete the /obj and /bin
files for all of my projects, restart Visual Studio and go on my merry way.

The first version of Visual Studio .NET had this problem, and I had hoped
that Microsoft had fixed it with the 2003 release, but it appears to not be a
significant enough problem for them. I only hope it gets corrected in
Whidbey.

-&&

"Daniel Billingsley" wrote:
Today I went to compile a solution I've been working on for months. I've
been off most of the last few months, so there's been a gap in the work, but
I did compile it a few times earlier this week.

Today I get a message:
Could not write to output file
'D:\DevelopmentProjects\Enterprise\CustomUtilities \obj\Debug\CustomUtilities
..dll' -- 'The process cannot access the file because it is being used by
another process. '

I found the KB article 313512
http://support.microsoft.com/default...b;en-us;313512 but it
doesn't seem to apply. I do have one assembly over 64k, but not the one in
the error message. Furthermore, the output paths and Local Copy settings
check out.

I thought I would try just deleting the file manually and recompiling.
Explorer says it can't delete the file. If I exit VS then I can delete the
file. Going back into VS I get a message that it can't find an assembly,
but it compiles ok. But only the first time, after that it's back to that
error message.

Any ideas what is keeping this file locked and how to fix it?

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by bissatch | last post: by
1 post views Thread by Curious | last post: by
1 post views Thread by pauld | last post: by
6 posts views Thread by =?Utf-8?B?U2NvdHQgVHJpY2s=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.