Ben*_*ley 5 asp.net msbuild webdeploy
我已将以下跳过规则添加到我的项目中,但是当我使用Web Deploy发布内容时,/ config文件夹中的文件将被清除.
我正在使用这里发现的过程,我发誓它以前工作过.
我已将以下内容添加到项目文件中:
<PropertyGroup>
<OnBeforePackageUsingManifest>AddCustomSkipRules</OnBeforePackageUsingManifest>
</PropertyGroup>
<Target Name="AddCustomSkipRules">
<ItemGroup>
<MsDeploySkipRules Include="SkipConfigFolder">
<SkipAction>Delete</SkipAction>
<ObjectName>dirPath</ObjectName>
<AbsolutePath>.*\\config\\$</AbsolutePath>
<XPath></XPath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="SkipConfigSubFolders">
<SkipAction>Delete</SkipAction>
<ObjectName>dirPath</ObjectName>
<AbsolutePath>.*\\config\\.*$</AbsolutePath>
<XPath></XPath>
</MsDeploySkipRules>
</ItemGroup>
</Target>
Run Code Online (Sandbox Code Playgroud)
当我发布(通过命令行使用包生成的cmd文件)时,输出以下内容:
-------------------------------------------------------
Start executing msdeploy.exe
-------------------------------------------------------
"C:\Program Files\IIS\Microsoft Web Deploy V2\\msdeploy.exe"
-source:package='<MyPackageFile>'
-dest:auto,includeAcls='False'
-verb:sync
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
-skip:skipaction='Delete',objectname='dirPath',absolutepath='.*\\config\\$'
-skip:skipaction='Delete',objectname='dirPath',absolutepath='.*\\config\\.*$'
-setParamFile:"<MySetParameters.xml>"
Info: Deleting filePath (Default Web Site/uPPK_32\config\New Text Document.txt).
Run Code Online (Sandbox Code Playgroud)
看起来正在添加跳过规则,但是通知新文本Document.txt正在被删除.我怎么能阻止这个?我错过了什么吗?
归档时间: |
|
查看次数: |
1802 次 |
最近记录: |