gpt4 book ai didi

visual-studio - 从 Visual Studio Web 安装项目中排除文件

转载 作者:行者123 更新时间:2023-12-02 02:32:41 29 4
gpt4 key购买 nike

我在 VS 中有一个 Web 安装项目。我将切换到 WiX,但那是以后的事,目前我需要解决以下问题。

我需要从项目中排除一些常见的 dll。所以我构建项目,VS 更新检测到的依赖项列表。我将它们排除在外并构建安装程序。我用 Orca 检查文件列表,安装程序中没有包含这些文件。

但是当我清理我的输出目录、重新加载解决方案并进行构建时,一些依赖项没有显示为已排除!所以他们最终进入了 MSI。 (这是构建机器上发生的事情)。

我认为问题可能在于这些是二级依赖项:我的应用程序 -> NHibernate.dll -> Antlr3.Runtime.dll(Antlr dll 最终出现在 MSI 中)。

这是一个错误还是我遗漏了什么?

最佳答案

我找到了 this page在 msdn 上有一个解决方法,可以将 Exclude 标志重置为 False:

Previously excluded files are included again when the solution is re-opened

When you exclude a file from a Setup project, you may see that the file is included again after you close and re-open the solution. This may occur if there are two copies of the same DLL file from two different source locations.

To work around this error, change the Copy Local property on one of the files:

In Solution Explorer, click on the DLL reference that you want to remove.

On the View menu, click Properties Window.

Change the Copy Local property to False.

关于visual-studio - 从 Visual Studio Web 安装项目中排除文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3133720/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com