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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:50:47+00:00 2026-06-13T06:50:47+00:00

If I run a c++ project/solution, in Visual Studio, with a command line option

  • 0

If I run a c++ project/solution, in Visual Studio, with a command line option “–xx”, how can I do the exact same thing from TeamCity ?

I have searched and have been unable to find any option.

The one thing that looks like “Command line parameters” is actually designated for MSBuild.

I have to run the solution – and not just the executable generated by the solution.

Thank you.

  • 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-13T06:50:48+00:00Added an answer on June 13, 2026 at 6:50 am

    Your Visual Studio build is executed using MSBuild on the server, the name may be a little confusing, but the parameters should function in the same way using that MSBuild parameter box as passing them to visual studio would be.

    if there are issues getting this to work using that parameters box, we will need some more information about the commands you need to run and the behaviour you need.

    Edit following questioner’s comment

    The problem in actuality here is that Visual Studio builds don’t really exist in TeamCity, visual studio build is actually just going to run MsBuild against your visual studio solution, which, in terms of Google Test, is sufficiently different to cause your problems.

    To resolve this, you are probably going to have to change your build runner to just be an MsBuild script which builds your solution and runs the Google tests. thankfully, the internet provides:

    http://code.google.com/p/msbuildteamcitytasks/wiki/RunGoogleTests

    The above is some MsBuild tasks which claim to integrate GoogleTest results completely with TeamCity, doing all the leg work for you in that regard. The result of this is that you only need a very brief build script calling MsBuild on your solution, followed by calling that MsBuild Task as required. I cant confirm how well they work or how easy they are to set up as I haven’t used them, but the documentation on the page implies it should be reasonably easy to put together.

    below is a snippet of MsBuild that will build your solution(s)

    <MSBuild Projects="@(BuildProjects)" Targets="Rebuild" BuildInParallel="true" Properties="Configuration=Debug;Platform=$(Platform)">
      <Output ItemName="DebugOutputs" TaskParameter="TargetOutputs"/>
    </MSBuild>    
    

    where each $() variable is a system property in your TeamCity configuration @(BuildProjects) is a list of solutions generated using this:

    <ItemGroup>
       <BuildProjects Include="$(WorkingArea)\**\*.sln" />
    </ItemGroup>
    

    you can of course hard code any and all of these variables, or change parameters as required, but this example will give you some freedom to reuse the script on other projects (its not a full script, there’s some extra structure stuff to go around the outside).

    you can of course build in further functionality to the script as required, or leave it as simple as possible to make it easy to understand.

    there is further documentation on MsBuild scripts are available from these locations:
    http://www.universalthread.com/ViewPageArticle.aspx?ID=61
    http://codingcockerel.co.uk/2008/04/15/automating-the-build-with-msbuild/
    http://www.codeproject.com/Articles/12985/Practical-NET2-and-C-2-An-introduction-to-MSBuild

    I’m sure there’s plenty more out there if you need it.

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

Sidebar

Related Questions

I have multiple Projects(site) in my Solution (visual studio 2010). when i run my
I have a Visual Studio 2008 solution with two projects (a Word-Template project and
In Visual Studio, you can unload a project, and when you build the solution
I have been playing with the Command Window in Visual Studio (View->Other Windows->Command Window).
I have a relatively large C#/WPF Visual Studio 2008 solution that I am trying
I have an SQL report in a visual studio 2008 project. I need to
We have a Visual Studio 2005 solution with 50 projects (mostly class libraries and
I have a command-line utility that gets quite a bit of downloads from my
I have a visual studio solution and when I opened it I got an
I have an ASP.NET project with outputType library, I need to run the project

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.