开发者

Excluding files from Visual Studio Web Setup Project

I have a Web Setup project in VS. I'll be switching to WiX, but that's in the future and currently I need to solve the following issue.

I need to exclude some common dlls from the project. So I build the project, VS updates the list of Detected Dependencies. I exclude them and the setup builds. I check the file list with Orca and the files are not included 开发者_StackOverflow社区in the installer.

But when I clean my output directory, reload the solution and do the build, some of the dependencies do not show as excluded! And so they end up in the MSI. (This is what is happening on the build machine).

I think that the problem might be with the fact that these are second-level dependencies: my app -> NHibernate.dll -> Antlr3.Runtime.dll (Antlr dll ends up in the MSI).

Is this a bug or am I missing something?


I found this page on msdn that has a work-around for the Exclude flag being reset to 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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜