gpt4 book ai didi

visual-studio-2010 - Visual Studio 2010 : How to exclude folder/files from "Build Deployment Package"?

转载 作者:行者123 更新时间:2023-12-04 03:08:48 25 4
gpt4 key购买 nike

是否可以从 VS 2010 的“构建部署包”功能中排除特定文件或文件夹?

在 VS 2008 中可以使用 Web 部署包,不幸的是这个项目在 VS2010 中不可用。

最佳答案

我还需要排除一些文件,我想从部署中删除程序集 .xml 文件(我在服务器上不需要它们),我在网上找不到任何东西,所以我决定自己寻找.

在深入研究我发现的 MsPublish 的 msbuild 之后,您需要在您的项目中设置以下内容(手动编辑 .csproj):

<ItemGroup>
<!-- This will exclude the .xml files from the bin folder -->
<ExcludeFromPackageFiles Include="$(OutputPath)*.xml" />

<!-- This will exclude the tmp folder from the bin folder -->
<ExcludeFromPackageFolders Include="$(OutputPath)tmp" />
</ItemGroup>

关于visual-studio-2010 - Visual Studio 2010 : How to exclude folder/files from "Build Deployment Package"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2340984/

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