Deploying NAnt Web Applications

Good day.

I am trying to deploy a web application using NAnt. This is the current zip value using the NAnt ZIP task.

I can try calling MSDeploy from NAnt, but I don't think MSDeploy was written for such deployments.

I can also try using the NAnt task.

Does anyone have any suggestions as to which approach can save me the most time?

+3
source share
1 answer

Using the aspnet compiler is the easiest way and gives you access to all cl arguments that are not available in nant tasks. I don’t know why this is so.

That's what I'm doing

<property name="aspnetcomplier" value="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe" />
  <target name="deploy">
    <mkdir dir="${output.dir}" />
    <exec program="${aspnetcomplier}">
      <arg value="-v" />
      <arg value="/trunk" />
      <arg value="-p" />
      <arg value="${source.dir}\Root" />
      <arg value="-f" />
      <arg value="${output.dir}" />
    </exec>
  </target

. .
iisreset/stop /start

  <target name="stop.iis" >
    <servicecontroller action="Stop" service="w3svc" timeout="10000" verbose="true" />
  </target>

  <target name="start.iis" >
    <servicecontroller action="Start" service="w3svc" timeout="10000" verbose="true" />
  </target>
+5

Source: https://habr.com/ru/post/1705695/


All Articles