Referencing private .net assemblies in a subfolder

落花浮王杯 提交于 2019-12-10 10:49:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!