Jump to content
  • Advertisement
Sign in to follow this  
DumbBill

Build error

This topic is 4055 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been developing a game with XNA for a couple of weeks now, and all was going great until just a couple of days ago. My solution consists of two projects, one class library that contains my 'engine', and an executable game project. Whenever I make a change to the class library and try to rebuild it, I get the following error:
Quote:
Unable to copy file "obj\x86\Debug\xxx.dll" to "bin\x86\Debug\xxx.dll". The process cannot access the file 'bin\x86\Debug\xxx.dll' because it is being used by another process.
The only way I can then get round it is to close and reopen Visual Studio Express Edition each time I make a change. VERY annoying. Now at first I thought it was because my game was not releasing stuff properly, but I now know that this is not the case. I have progressively removed all the code from the main program file until I reached the point at which it basically did nothing, and still I get the same problem. Then I also tried just making a change to the class library and rebuilding without even running the game, and still the same thing. So I am 99.99% sure it is Visual Studio that has a hold on the file. Has anyone else experienced this? Please help... it was all going so well!

Share this post


Link to post
Share on other sites
Advertisement
I've never used XNA but I would say that this error comes up because your program did not exit correctly and the dll is still being accessed by your computer. You can try to go into task manager and terminate the task or you can shut down your computer. I think that there may be an option in visual studio to fix this by deleting the file before rebuild or something but I don't know what it would be.

Share this post


Link to post
Share on other sites
Thanks for the reply, but I'm not sure if you read my post fully. As I mentioned I get the problem even if I don't run the application, so it cannot be because it is not exiting properly.

Anyway, after many hours of random trial and error I have finally found a workaround. I forgot to mention earlier that I also have a third project in my solution for the level editor, and this also references the class library project. I found that if I removed this project from the solution, the problem seems to go away. This is most strange, since it was working fine before even with both other projects still in there.

So if anyone else has this issue and finds another way around it, I'm all ears!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!