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

  • Home
  • SEARCH
  • 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 5966891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:51:51+00:00 2026-05-22T19:51:51+00:00

I have a question about precompiling ASP.NET web application projects from TeamCity. This is

  • 0

I have a question about precompiling ASP.NET web application projects from TeamCity. This is sort of a follow-up question to the following thread:

How to deploy after a build with TeamCity?

I’m done implementing CI from unit testing to autodeploy using the above thread and now I’d like to complement the process with precompiling the project. The project is rather large and I want to avoid any unnecessary delays in the response time after a new deploy.

So, is there a way to do this from TeamCity? Like calling MSBuild with some specific arguments?

  • 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-22T19:51:52+00:00Added an answer on May 22, 2026 at 7:51 pm

    Sure, it can be done with a custom MSBuild script. Here’s the one we run to precompile our ASP.NET MVC 3 website (not that it really varies by ASP.NET version).

    First it runs the regular build by running MSBuild against the solution file, then runs this custom MSBuild code:

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    
      <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
      <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
    
      <PropertyGroup>
        <WebProject>Web\ChatPast.Web\ChatPast.Web.csproj</WebProject>
        <WebProjectFolder>Web\ChatPast.Web</WebProjectFolder>
        <WebPublishFolder>ChatPastWebPublish</WebPublishFolder>
      </PropertyGroup>
    
      <ItemGroup>
        <ZipFiles Include="$(teamcity_build_workingDir)\src\ChatPast\$(WebPublishFolder)\**\*.*" />
      </ItemGroup>
    
      <Target Name="Build">
          <!-- Compilation of all projects -->
          <MSBuild Projects="ChatPast.sln" Properties="Configuration=Release"/>
    
          <!-- Creating web publish folder. -->
          <RemoveDir Directories="$(WebPublishFolder)"/>
          <MakeDir Directories="$(WebPublishFolder)"/>
    
          <!-- Running ASP.NET publish -->
          <MSBuild Projects="$(WebProject)"
               Targets="ResolveReferences;_CopyWebApplication"
               Properties="Configuration=Release;WebProjectOutputDir=..\..\$(WebPublishFolder);OutDir=..\..\$(WebPublishFolder)\bin\" />
    
      </Target>
    </Project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about using streams in .NET to load files from disk.
I'm learning asp.net. I have question about example buttons I can use two types
I have a question about locking. This doesn't have to be only about record
I have a question about how to deploy WPF application into a PC without
I have a question about using os.execvp in Python. I have the following bit
I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,
I have a question about this question . I posted a reply there but
I have question about throw. How will the throw work in the following code?
I have question about python and sqlite3. I want to drop a table from
I have question about removing element from QList. myclass.h: class node2D : public QObject

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.