Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

nant script.

Posted on 2008-10-30
1
Medium Priority
?
646 Views
Last Modified: 2013-12-14
how to create nant script to publish the Web application using msbuild?
0
Comment
Question by:krishna_kowluri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
Tony McCreath earned 1500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

715 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