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.
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.
链接地址: http://www.djcxy.com/p/81616.html上一篇: ASP.NET MVC 4 Visual Studio 2010项目模板不存在
下一篇: 发布Web应用程序时引用的DLL?