Visual Studio (UI를 통해 프로젝트를 마우스 오른쪽 단추로 클릭하고 게시)를 통해 PublishProfile로 내 MVC 프로젝트를 게시하고 대상 폴더를 지우는 옵션을 선택합니다. 그러나 특정 폴더 "다운로드"를 지우고 싶지 않습니다.wpp.targets의 MsDeploySkipRules이 PublishProfiles와 함께 작동하지 않습니다.
나는이 작업을하기 위해 수많은 시간을 보냈지만 here 사람과 똑같은 코드가 있다고 생각하지만 다운로드 폴더는 계속 삭제됩니다.
또한 아래 예에서 대상 폴더 삭제를 선택 취소하면 작동하는 "favicon"ExcludeFromPackageFiles가 있습니다. 실제로 내 wpp 대상이 실제로 실행 중임을 보여줍니다.
다음내 projectname.wpp.targets는
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- this doesnt work -->
<PropertyGroup>
<AfterAddIisSettingAndFileContentsToSourceManifest>AddCustomSkipRules</AfterAddIisSettingAndFileContentsToSourceManifest>
</PropertyGroup>
<PropertyGroup>
<UseMsDeployExe>true</UseMsDeployExe>
</PropertyGroup>
<Target Name="AddCustomSkipRules">
<Message Text="Adding Custom Skip Rules" />
<ItemGroup>
<MsDeploySkipRules Include="SkipErrorLogFolder1">
<SkipAction>Delete</SkipAction>
<ObjectName>filePath</ObjectName>
<AbsolutePath>ErrorLog</AbsolutePath>
</MsDeploySkipRules>
</ItemGroup>
</Target>
<!-- this works! -->
<ItemGroup>
<ExcludeFromPackageFiles Include="favicon.ico">
<FromTarget>ContactManager.Mvc.wpp.targets</FromTarget>
</ExcludeFromPackageFiles>
</ItemGroup>
</Project>
어떤 아이디어를 제출한다?
여전히 Visual Studio 2013의 경우 누구에게 알리십니까? – Saustrup