Assemblies in dedicated bin directory for application

A

Anders Borum

Hello!

I guess this is a silly question, but I've asked google with no luck .. so
here goes:

Is it possible to place the assemblies associated with a .NET client (i.e.
winform / console) application in a dedicated "bin" directory as is the case
with ASP.NET applications?

Although I haven't researched this extensively, I hope it's possible to
change the default directory used by the assembly loader to probe for
assemblies.

I believe it adds tremendously to the tidyness of the application
(filesystem wise), if you're left with a single executeable file (as well as
the app.config obviously) in the app directory.

Thanks in advance :)
 
M

Michael Nemtsev

Hello Anders,

Set the desired path with AppDomainSetup.ApplicationBase property

AB> Hello!
AB>
AB> I guess this is a silly question, but I've asked google with no luck
AB> .. so here goes:
AB>
AB> Is it possible to place the assemblies associated with a .NET client
AB> (i.e. winform / console) application in a dedicated "bin" directory
AB> as is the case with ASP.NET applications?
AB>
AB> Although I haven't researched this extensively, I hope it's possible
AB> to change the default directory used by the assembly loader to probe
AB> for assemblies.
AB>
AB> I believe it adds tremendously to the tidyness of the application
AB> (filesystem wise), if you're left with a single executeable file (as
AB> well as the app.config obviously) in the app directory.
AB>
AB> Thanks in advance :)
AB>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
M

Michael Nemtsev

Hello Michael ,

or
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="<your path>" />
</assemblyBinding>

MN> Hello Anders,
MN>
MN> Set the desired path with AppDomainSetup.ApplicationBase property
MN>
AB>> Hello!
AB>>
AB>> I guess this is a silly question, but I've asked google with no
AB>> luck .. so here goes:
AB>>
AB>> Is it possible to place the assemblies associated with a .NET
AB>> client (i.e. winform / console) application in a dedicated "bin"
AB>> directory as is the case with ASP.NET applications?
AB>>
AB>> Although I haven't researched this extensively, I hope it's
AB>> possible to change the default directory used by the assembly
AB>> loader to probe for assemblies.
AB>>
AB>> I believe it adds tremendously to the tidyness of the application
AB>> (filesystem wise), if you're left with a single executeable file
AB>> (as well as the app.config obviously) in the app directory.
AB>>
AB>> Thanks in advance :)
AB>>
MN> ---
MN> WBR,
MN> Michael Nemtsev :: blog: http://spaces.live.com/laflour
MN> "At times one remains faithful to a cause only because its opponents
MN> do not cease to be insipid." (c) Friedrich Nietzsche
MN>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
A

Anders Borum

Hi again,

It would be nice if I could get VS 2005 to output my assemblies in the
dedicated "bin" directory. Any chance you've got the solution around too?
:)
 
M

Michael Nemtsev

Hello Anders,

Add PostBuild event to your compiling stage in VS, but u need to enumerate
your assemblies manually

AB> Hi again,
AB>
AB> It would be nice if I could get VS 2005 to output my assemblies in
AB> the dedicated "bin" directory. Any chance you've got the solution
AB> around too? :)
AB>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top