質問

I have a solution structure like in Ports And Adapters Architecture or Onion Architecture. My composition root (a web application in this case) and infrastructure libraries only reference the core library.

I can also load infrastructure libraries at runtime using Castle Windsor. However I do not reference these libraries on my composition root so their build output is not copied to the output folder. I guess I need a custom build step but I don't know how I can accomplish this.

役に立ちましたか?

解決 2

I ended up with setting unreferenced projects' output path same same as the web application's.

..\WebApp\bin

This works well for building the solution inside Visual Studio. For release builds (only building the Website project) I wrote a custom script that builds Web application and other libraries. After those libraries are built, all dll files are copied to WebApp\bin folder inside _PublishedWebsites using a Copy task.

他のヒント

Use a post build event to copy the assemblies to the output directory. Here is a tutorial you'll be able to get a good feel for it from.

http://eyeung003.blogspot.com/2009/11/visual-studio-post-build-event-to-copy.html?m=1

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top