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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The process cannot access the file because it is being used by another

Status
Not open for further replies.

JerryKreischer

Programmer
Jul 31, 2003
20
US
I've inherited a system w/5 projects - I'll refer to them as P1 thru P5 - P5 being the executable...
P1 has no dependents.
P2 is dependant upon P1
P3 has no dependents.
P4 is dependant upon P1, P2, P3
P5 is dependant upon P1, P2, P3, P4

The build order is:
P1, P2, P3, P4, P5

So far so good?

I'm setting the 'Build' path of each project to Px\obj\debug with the exception of the main project (P5)- that is being built into its \BIN folder...

When I set the necessary references that each project needs to reference, for example, P2 needs a reference to P1, so I'll set that to P1\obj\debug\P1.DLL and so on.

What I'm getting now for the first 4 projects is:
Preparing resources...
Updating references...
Performing main compilation...
vbc : error BC31019: Unable to write to output file 'C:\xxx\obj\Debug\P1.dll': The process cannot access the file because it is being used by another process.
Building satellite assemblies...

and each one fails...

Can someone tell me (or point me somewhere) what I'm doing wrong???

Thanx
JK
 
VS is very picky when you try to make it do something other than the way it wants to work by default (obviously). Usually I have each project build into it's own bin debug|relase directory, and set up my dependencies based on "project output" and not a direct path to a dll, so that it will know where to get the right dll based on whet build type is running (debug or release).

Maybe remove all the dependencies, reset each project's output directory to simply "bin" for each, and then go back and set up the dependencies using "project output"?

HTH

David
[pipe]
 
David:

I was finally able to get things working by setting the references via Projects. For now, I'm satisfied - but I know I'll have to continue searching for exactly how/where the compiled projects should reside and how to set their references w/in other projects.

Thanx again
JK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top