MSDeploy runCommand using relative path

前端 未结 2 1832
臣服心动
臣服心动 2020-12-31 06:07

I am trying to run a command as a part of my packaging/deployment process via MSDeploy. In particular, I am trying to create a custom event log by running installut

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 06:34

    You can add definition of DeploymentDir to the .csproj with the action you wrote above:

    
    Release Deployment Dir
    Debug Deployment Dir
    C:\inetpub\wwwroot
    NewTestApp
    MyTestApp
    $(DeploymentDir)\$(ApplicationName)\bin
    
    

    Theese conditions will allow to change everything from command line to take full control over the build process in your build system or script.

    MSBuild.exe yourproj.proj /p:Configuration=Release /p:DeploymentDir=D:\package /p:ApplivationName=BestAppForever
    

    And inside of your task you can use it

    
      
        installutil $(ApplicationDeploymentDir)\BusinessLayer.dll
      
    
    

提交回复
热议问题