PC Review


Reply
Thread Tools Rate Thread

How To Compile All Assemblies into One Folder?

 
 
Mario T. Lanza
Guest
Posts: n/a
 
      25th Jul 2003
I am working with Visual Studio. The solution I am developing is
composed of about 8 separate projects. Some of these projects
represent different tiers in the N-tiered architecture (data, business
logic, presentation, etc.). Right now, some of the projects are
inter-related and reference each other using Project References. When
I select "Rebuild Solution" to compile, each project is successfully
compiled into its own directory (and each project has its own
directory). Because I use Project References, copies of the
referenced assemblies are copied into each directory whose project
makes use of them. In this way, one commonly used assembly might be
copied into 4 or 5 other folders. This results in a lot of redundancy
that I hope to avoid.

I would like to compile everything into one single directory.
Presently, I compile everything using "Rebuild Solution" and then copy
all of the assemblies and executables into one folder. I would like
to avoid this step and compile everything into one folder from which I
can run my application.

Using the solution explorer, I have right-clicked on the projects,
chosen "Properties" and located the "Configuration Properties" and
selected the "Build" tab. It has a property called "Output Path"
which would seem to allow me to do exactly what I want to do; however,
there's a catch. After pointing all my projects to one folder I
attempt a "Rebuild Solution". Inevitably the compile fails with error
messages of this nature:

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

and

"Could not copy temporary files to output directory."

and

"Cannot copy assembly 'AssemblyName' to file 'C:\...\MyAssembly.dll'.
The process cannot access the file because it is being used by another
process."

It seems by pointing all of the projects to one output path that the
compiler keeps butting heads with itself. This is annoying. Doesn't
it make sense that I should be able to compile a more complicated
program (broken down into parts) all into one working directory?

Any help would be appreciated. I have been working around this issue
for the last year and a half!

Mario T. Lanza
Clarity Information Architecture, Inc.
 
Reply With Quote
 
 
 
 
Richard Grimes [MVP]
Guest
Posts: n/a
 
      10th Sep 2003
To be honest I don't know how to solve this. The alternative is to use a
make file. Visual Studio is still delivered with nmake and it is simple to
create a makefile. Using a makefile still means that you can use the IDE to
write code and use the IDE debugger (to use the debugger, use the File->Open
Solution, change Files of Type to Executable Files and load the EXE that you
built with debug info /debug)

Richard
--
my email (E-Mail Removed) is encrypted with ROT13 (www.rot13.org)


"Mario T. Lanza" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am working with Visual Studio. The solution I am developing is
> composed of about 8 separate projects. Some of these projects
> represent different tiers in the N-tiered architecture (data, business
> logic, presentation, etc.). Right now, some of the projects are
> inter-related and reference each other using Project References. When
> I select "Rebuild Solution" to compile, each project is successfully
> compiled into its own directory (and each project has its own
> directory). Because I use Project References, copies of the
> referenced assemblies are copied into each directory whose project
> makes use of them. In this way, one commonly used assembly might be
> copied into 4 or 5 other folders. This results in a lot of redundancy
> that I hope to avoid.
>
> I would like to compile everything into one single directory.
> Presently, I compile everything using "Rebuild Solution" and then copy
> all of the assemblies and executables into one folder. I would like
> to avoid this step and compile everything into one folder from which I
> can run my application.
>
> Using the solution explorer, I have right-clicked on the projects,
> chosen "Properties" and located the "Configuration Properties" and
> selected the "Build" tab. It has a property called "Output Path"
> which would seem to allow me to do exactly what I want to do; however,
> there's a catch. After pointing all my projects to one folder I
> attempt a "Rebuild Solution". Inevitably the compile fails with error
> messages of this nature:
>
> "The file 'MyAssembly.dll' cannot be copied to the run directory. The
> process cannot access the file because it is being used by another
> process."
>
> and
>
> "Could not copy temporary files to output directory."
>
> and
>
> "Cannot copy assembly 'AssemblyName' to file 'C:\...\MyAssembly.dll'.
> The process cannot access the file because it is being used by another
> process."
>
> It seems by pointing all of the projects to one output path that the
> compiler keeps butting heads with itself. This is annoying. Doesn't
> it make sense that I should be able to compile a more complicated
> program (broken down into parts) all into one working directory?
>
> Any help would be appreciated. I have been working around this issue
> for the last year and a half!
>
> Mario T. Lanza
> Clarity Information Architecture, Inc.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assemblies getting deleted after compile (.Net 2003) =?Utf-8?B?SmVmZQ==?= Microsoft C# .NET 0 8th Aug 2006 11:12 AM
Multiple web project Assemblies in same bin folder. zeyais@gmail.com Microsoft ASP .NET 2 15th Apr 2006 08:12 PM
Create my own batch file to compile ASP.NET assemblies Raterus Microsoft ASP .NET 1 23rd Apr 2004 03:12 PM
my common .net assemblies in a different folder than exe korazy Microsoft Dot NET 0 29th Feb 2004 01:17 AM
Assemblies getting deleted after compile (VS.IDE) Chris Snyder Microsoft Dot NET 0 24th Sep 2003 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:08 PM.