开发者

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 publishi开发者_运维知识库ng 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.


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

Usefull link : http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx


You can add them to the project (just like you add an image) and change the property Copy To Output Directory to Copy if Newer. Then when you build they should be placed into the bin. That should work when you publish too.


It will only publish from the folders in your website. I have always just had the website reference those files so when I built it they were then local to the site and would be published along with everything else.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜