Solved

nant script.

Posted on 2008-10-30
1
638 Views
Last Modified: 2013-12-14
how to create nant script to publish the Web application using msbuild?
0
Comment
Question by:krishna_kowluri
1 Comment
 
LVL 23

Accepted Solution

by:
Tiggerito earned 500 total points
ID: 22930636
Here is the target I use for .Net 2.0.

The echo lines indicate the properties you must set before calling it. The internally defined properties are optional based on the type of application you are compiling. many are for clickonce applications.

You should place all externally defined dlls in the ReferencePath before calling this.


  <target name="MsBuild">

    <property name="msBuild.exe" value="${framework::get-framework-directory('net-2.0')}/msbuild.exe" />
 

 

    <echo message="MsBuild ProjectFile: ${ProjectFile}"/>

    <echo message="MsBuild SolutionConfiguration: ${SolutionConfiguration}"/>

    <echo message="MsBuild OutputPath: ${OutputPath}"/>

    <echo message="MsBuild ReferencePath: ${ReferencePath}"/>
 

    <property name="ProductName" value="" overwrite="false"/>

    <property name="ApplicationVersion" value="" overwrite="false"/>

    <property name="ApplicationRevision" value="" overwrite="false"/>

    <property name="OutputPath" value="" overwrite="false"/>

    <property name="ReferencePath" value="" overwrite="false"/>

    <property name="InstallUrl" value="" overwrite="false"/>

    <property name="AssemblyName" value="" overwrite="false"/>

    <property name="SupportUrl" value="" overwrite="false"/>

    <property name="PublishRevision" value="" overwrite="false"/>

    <property name="MinimumRequiredVersion" value="" overwrite="false"/>
 

    <exec program="${msBuild.exe}">

      <arg value="${ProjectFile}" />

      <arg value="/target:rebuild" />

      <arg value="/p:Configuration=${SolutionConfiguration}" />

      <arg value="/p:PublisherName=&quot;${Publisher}&quot;" />

      <arg if="${ProductName!=''}" value="/p:ProductName=&quot;${ProductName}&quot;" />

      <arg if="${CurrentVersion!=''}" value="/p:ApplicationVersion=&quot;${CurrentVersion}.*&quot;" />

      <arg if="${PublishRevision!=''}" value="/p:ApplicationRevision=&quot;${PublishRevision}&quot;" />

      <arg if="${OutputPath!=''}" value="/p:OutputPath=&quot;${OutputPath}/&quot;" />

      <arg if="${ReferencePath!=''}" value="/p:ReferencePath=&quot;${ReferencePath}&quot;" />

      <arg if="${InstallUrl!=''}" value="/p:PublishUrl=&quot;${InstallUrl}&quot;" />

      <arg if="${InstallUrl!=''}" value="/p:InstallUrl=&quot;${InstallUrl}&quot;" />

      <arg if="${InstallUrl!=''}" value="/p:UpdateUrl=&quot;${InstallUrl}&quot;" />

      <arg if="${SupportUrl!=''}" value="/p:SupportUrl=&quot;${SupportUrl}&quot;" />

      <arg if="${MinimumRequiredVersion!=''}" value="/p:MinimumRequiredVersion=&quot;${MinimumRequiredVersion}&quot;" />

      <!--			<arg value="/p:AssemblyOriginatorKeyFile=&quot;${ArtifactsPath}/Certificates/Nexus2.pfx&quot;"/>

	<arg value="/p:ManifestKeyFile=&quot;${ArtifactsPath}/Certificates/Nexus2.pfx&quot;"/> -->

      <arg value="/verbosity:normal" />

    </exec>

  </target>

Open in new window

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now