问题
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
回答1:
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
回答2:
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.
回答3:
You can add pre/post build event commands in VS (under project properties -> "build events") to copy the files to the location you need.
来源:https://stackoverflow.com/questions/385129/referencing-private-net-assemblies-in-a-subfolder