Search code examples
asp.netvisual-studio-2010deployment

How do you include a non-referenced dll when publishing a web application?


I have various dll's that I am not directly referencing in a ASP.NET website I am attempting to publish via the "Package/Publish Web" feature in Visual Studio 2010.

How can I tell the publishing feature that it needs to include these certain files?

Note that I do not want to directly reference these dll's (the solution has specifically been setup in a way so that these specific dll's are not directly referenced).

I've found a <ExcludeFilesFromDeployment/> but I can't find a way to specifically include files.


Solution

  • If you want to include files through the Publish method you could use "FilesForPackagingFromProject" elements in the MSbuild file (.*proj)

    Useful link : https://sedodream.com/2010/05/01/web-deployment-tool-msdeploy-build-package-including-extra-files-or-excluding-specific-files