views:

475

answers:

3

In Visual Studio 2008 I can add a project reference and set Copy Local property to true. As result the referenced assembly will be copied to the same folder the main assembly is build to.

But what if I want to have all referenced assemblies in a subfolder near the main assembly?

Something like this:

..
myApp.exe
Libs
  myLib1.dll
  myLib2.dll
Data
  myDatabase.sqlite

PS: This is the smart device application build against .NET Compact Framework 3.5

A: 

You could turn off the "Copy Local" setting, then setup a build action on the referenced projects to copy the dlls to your Libs folder after every build.

Kevin Tighe
A: 

You can add pre/post build event commands in VS (under project properties -> "build events") to copy the files to the location you need.

moose-in-the-jungle
+1  A: 

Hello,

For other versions of the framework, this is what you would do:

http://msdn.microsoft.com/en-us/library/twy1dw1e.aspx

For compact, I suggest reading this:

http://blogs.msdn.com/stevenpr/archive/2005/01/05/347353.aspx

HTH

Colby Africa

Colby Africa
That means that the only way to do it in .netcf is Assembly.LoadFrom?
masterik
Yeah, I believe that to be true but I am trying to verify it remains the only way in the latest rev.
Colby Africa