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 8590555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:19:13+00:00 2026-06-11T23:19:13+00:00

At my current client we have some legacy ASP.Net web site projects. I am

  • 0

At my current client we have some legacy ASP.Net web site projects. I am in the process of introducing automatic versioning for our builds and was wondering of how to best do this with web site projects in Team City?

I am currently using Team City’s %build.number% variable (set through project build template) as the authoritative version number for a build. For any .NET project that produces assemblies it’s hassle-free to use “AssemblyInfo Patcher” Build Feature in Team City but this does not work for web site projects since they do not produce assemblies.

So, any suggestions? I am already using Powershell and psake in my builds so creating scripts that use %build.number% is not a problem, it is more a question of how to inject this into the web site project in a “nice” manner.

  • 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-06-11T23:19:14+00:00Added an answer on June 11, 2026 at 11:19 pm

    I attempted several solutions but ended up with using the version number of a dependent assembly that gets set by Team City during the build. I added a class to the assembly and it looks something like this:

    public class VersionUtils
    {
        private readonly ILog _logger;

    public VersionUtils()
    {
    _logger = LogManager.GetLogger("VersionLogger");
    }

    public string GetWebAppVerison()
    {
    string version = "unknown version";

    var assembly = Assembly.GetAssembly(typeof(VersionUtils));
    try
    {
    version = assembly.GetName().Version.ToString();
    }
    catch(Exception ex)
    {
    _logger.Warn("Could not find or read version number from " + assembly.GetName(), ex);
    }

    return version;
    }

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

Sidebar

Related Questions

I'm building an ASP.NET MVC site where I want to have a Google Maps
We have some client code which is using the SqlConnection class in .NET to
I have a current system using IIS 6 and 7, written in ASP.NET with
We have some code that occasionally flushed out certain keys in the ASP.NET cache
We're about to start a new project, and our client's current application is .NET
I have some code in an asp.net app that needsto get the ipv4 address
For several applications I made for my current client I have shared user accounts.
Current Process: I have a tar.gz file. (Actually, I have about 2000 of them,
I have some sites powered by Joomla, but with my current assignment I wanted
I have some computed-columns of two types: Computed columns based on columns in current

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.