4

I am using package deployment of web application through MSDeploy.

I don't want to deploy web.config through it.

So how can i skip the config file deployment through ms-deploy.

I am using below Command for deployment.

msdeploy.exe -verb:sync -source:package=C:\udeploy\agent\var\work\JenKins\MwApplicationData\MarketWorkFlowWebApp.zip -dest:auto=localhost -setParam:name=%1,value=%2 -enableLink:AppPoolExtension

1 Answer 1

4

I have done this by including the below in the project file (.csproj) towards the bottom after lines like <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

    <Target Name="CustomExcludeFiles" BeforeTargets="ExcludeFilesFromPackage">
      <ItemGroup>
           <ExcludeFromPackageFiles Include="web.config"></ExcludeFromPackageFiles>
      </ItemGroup>
    </Target>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.