Pergunta

I have a dependency folder that I use for dll's in my web application. Some are referenced in the web application, others aren't. However for the application to run I need to have all the dll's in the bin directory of the web application. But I dont want to reference them in the web app. Is there a work around for this? I was considering the post build event to copy in the dll's required from dependencies to bin directory.

Foi útil?

Solução

You can use PostBuild event as you mentioned or edit the project file to include MSBuild Copy Task. Check: http://msdn.microsoft.com/en-us/library/3e54c37h.aspx

Outras dicas

If the assemblies are implicitly referenced (required by assemblies you have referenced) they should be automatically copied to the output path. If there are assemblies which you are dynamically loading with reflection like form example some plugins you will need to copy them manually to the bin folder. A post-buid event seems like a good approach.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top