如何设置.csproj的文件MSDeploy设置 [英] How to set MSDeploy settings in .csproj file
本文介绍了如何设置.csproj的文件MSDeploy设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法来设置MSDeploy参数.csproj的文件本身的ASP.NET MVC项目的?特别是跳过参数,它应该跳过一个临时文件夹中。
Is there a way to set MSDeploy parameters in .csproj file itself of ASP.NET MVC project? Particularly a "skip" parameter, which should skip a "Temp" folder.
-skip:objectName=dirPath,absolutePath="\\temp"
..或者我怎么能传递此参数到MSBuild.exe参数列表?
.. or how can I pass this parameter into MSBuild.exe arguments list?
推荐答案
定义< MsDeploySkipRules>
在项目文件。例如:
Define <MsDeploySkipRules>
in the project file. For example:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OnBeforePackageUsingManifest>AddSkipRules</OnBeforePackageUsingManifest>
</PropertyGroup>
<Target Name="AddSkipRules">
<ItemGroup>
<MsDeploySkipRules Include="SkipTempDirOnDeploy">
<SkipAction></SkipAction>
<ObjectName>dirPath</ObjectName>
<AbsolutePath>$(_Escaped_PackageTempDir)\\Temp$</AbsolutePath>
<XPath></XPath>
</MsDeploySkipRules>
</ItemGroup>
</Target>
</Project>
这篇关于如何设置.csproj的文件MSDeploy设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文