Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4081666
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:05:24+00:00 2026-05-20T18:05:24+00:00

How can I use nant tasks to increment build versions? To be more specific

  • 0

How can I use nant tasks to increment build versions? To be more specific how can I link this up with version numbers in assemblyinfo.cs?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:05:25+00:00Added an answer on May 20, 2026 at 6:05 pm

    You’ll want to consider some sort of system for managing your version increments. One common way to do it is through continuous integration such as CruiseControl.NET. If you go this route, you can use a build target like this:

    <target name="set.version" description="generates the version number">
        <echo message="Setting the build version to ${CCNetLabel}..." />
        <attrib file="AssemblyInfo.cs" readonly="false" />
        <asminfo output="AssemblyInfo.cs" language="CSharp">
            <imports>
                <import namespace="System" />
                <import namespace="System.Reflection" />
            </imports>
            <attributes>
                <attribute type="AssemblyVersionAttribute" value="${CCNetLabel}" />
                <attribute type="AssemblyFileVersionAttribute" value="${CCNetLabel}" />
            </attributes>
        </asminfo>
        <attrib file="AssemblyInfo.cs" readonly="true" />
    </target>
    

    Where CCNetLabel is a dynamic property that is set from CruiseControl when it executes nant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone please provide me a sample build file demostrating the use of the
I'm trying to use NAnt/NAntContrib build script to build a web application on Windows
We use a CruiseControl.Net/NAnt/Subversion stack for CI. Doing a fresh checkout for every build
I trying to use nant to build a solution via msbuild. The problem is
how can use JS variable in PHP like this ? <script> x = document.getElementById(1).value;
Can I use tstamp property BuildDate in a nant task to an xecutable task
I can use FireFox and FireBug, in a pane, I can open a .css
I can use the PRINT statement in a stored procedure to debug my code.
I can use stat() to figure out what permissions the owner, group, or others
We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&fq=x:[10 TO 100] AND y:[20 TO 300]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.