我想排除bin文件夾被複制到發佈目錄。如何從Visual Studio發佈中排除bin文件夾?
使用Visual Studio 2015年,Asp.Net Web應用程序項目
下面是我的.pubxml文件。請注意,「bin」列在ExcludeFoldersFromDeployment元素中。列出的所有其他文件夾按預期排除,但此bin文件夾仍被複制!
bin目錄不同我想象它不是項目的一部分,而是構建輸出的一部分。我的編譯輸出路徑指向與我發佈並正常工作不同的目錄。爲什麼bin仍然被複制到發佈輸出目錄?可以排除嗎?
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ExcludeFilesFromDeployment>Web.config;Default.aspx;packages.config</ExcludeFilesFromDeployment>
<ExcludeFoldersFromDeployment>bin;js;TestingUtils;TestPages;UI</ExcludeFoldersFromDeployment>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>C:\website</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
編輯的問題作出明確我已經這樣做了,它不起作用 – mje777