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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:13:26+00:00 2026-06-09T13:13:26+00:00

I have a msbuild script that builds multiple projects using TeamCity. It builds a

  • 0

I have a msbuild script that builds multiple projects using TeamCity. It builds a few C++ builder 2010 projects, and some C# projects. It also creates an installer for them and packages it all. Now I have a new project that I want to add, but the problem is that it’s build using .Net Framework 4, while the other older ones, along with the build scripts themselves, target .Net Framework 2.

In the settings in TeamCity it’s selected to build using msbuild 2 and changing it to 4 (hoping it was backwards compatible) just causes massive amounts of errors.

I was wondering if there is a good way to make a specific projects build using msbuild 4 instead, without resorting to making new buildsteps in TeamCity.

I tried invoking msbuild 4 from msbuild 2 using the exec comand and it worked fine. But perhaps there is some “nicer” way of doing it.

Example of what “worked”

<Exec Command="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild /t:FooBar /p:Configuration=Debug ..\FooBar\FooBar.sln"/>

Update: I managed to get all the old stuff compiling using msbuild and .Net Framework 4. So this isn’t really an issue anymore.

  • 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-09T13:13:28+00:00Added an answer on June 9, 2026 at 1:13 pm

    I solved it the “correct” way. Making sure all the old stuff could be built using the newer msbuild and target the .Net Framework they were intended for. The approach of using exec also worked but always felt like a hack.

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

Sidebar

Related Questions

I have a msbuild script that includes creation of a few PDF's using PDF
I have a MSBuild script that I am executing through TeamCity. One of the
I have been using a msbuild file that builds and packages my solution to
I have a MSBuild script that builds my windows forms application, generates the application
On our continous integration server (Teamcity 5.1.3) we have a msbuild script that is
I am using TeamCity to run an MSBuild script that cleans and rebuilds one
I have an MSBuild script that uses NUnit to run tests in two assemblies.
I'm trying to create a MSBuild script for running in TeamCity. I have a
I have a custom MSBuild task that peeks inside an assembly to get some
I have an msbuild script that runs on Team Foundation build. One of the

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.