发布 Web 应用程序时如何包含未引用的 dll?

发布于 2024-10-09 11:37:18 字数 289 浏览 0 评论 0原文

我有各种 dll,但我没有在 ASP.NET 网站中直接引用,而是尝试通过 Visual Studio 2010 中的“打包/发布 Web”功能进行发布。

如何告诉发布功能需要包含哪些内容这些特定的文件?

请注意,我不想直接引用这些 dll(该解决方案已专门设置为不直接引用这些特定的 dll)。

我找到了 但我找不到专门包含文件的方法。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

救赎№ 2024-10-16 11:37:18

如果您想通过 Publish 方法包含文件,您可以在 MSbuild 文件 (.*proj) 中使用“FilesForPackagingFromProject”元素。

有用的链接:http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageInclusionExtraFilesOrExducingSpecificFiles.aspx

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

这个俗人 2024-10-16 11:37:18

您可以将它们添加到项目中(就像添加图像一样)并将属性复制到输出目录更改为如果较新则复制。然后,当您构建它们时,应将它们放入垃圾箱中。当您发布时,这也应该有效。

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.

鹤仙姿 2024-10-16 11:37:18

它只会从您网站中的文件夹发布。我一直只是让网站引用这些文件,因此当我构建它时,它们就位于该网站的本地文件中,并将与其他所有内容一起发布。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文