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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:09:11+00:00 2026-05-23T06:09:11+00:00

I have a large solution containing many projects with one of them being a

  • 0

I have a large solution containing many projects with one of them being a Setup project. There are also many current versions stored in separate branches. I have a build tool that used to work in .NET 2, but hasn’t worked since we upgraded to .NET 4.

Internally, the new .NET 4 version of the build tool uses Microsoft.TeamFoundation.Client.RegisteredTfsConnections.GetProjectCollections() and versionControlServer.GetAllTeamProjects(false) to get a collection of TeamProjects from my TFS source control server.

I then display them visually in the UI and when a user clicks on a particular solution version, the application calls the following to get the latest for that solution version:

workspace.Get(new string[] { serverPath }, VersionSpec.Latest, RecursionType.Full, 
   GetOptions.GetAll);

The application used to build the solution files and this would include the Setup project. At this stage, the setup project would create an MSI that the application could be installed with. It is this last step that I am having problems with.

I need to be able to programmatically build the solution that the user selected using C# code. The working .NET 2 code for this was as follows:

Process process = new Process();
ProcessStartInfo processStartInfo = process.StartInfo;
processStartInfo.FileName = processName;
processStartInfo.Arguments = string.Format(" \"{0}\" /BUILD \"Release|Any CPU\"", 
   solutionPath);
processStartInfo.WorkingDirectory = processDirectory;
process.Start();

There is no error when this is run, but it no longer launches Visual Studio and builds the code. Clearly, this was a poor way to do it initially, but I can’t find the ‘correct’ way using the TFS classes.

I also tried running MSBuild.exe directly (similar to the above example), and this does build the solution, but for some reason does not build the Setup project that produces the MSI. Note that I do NOT use any manually created build files.

Unfortunately, useful documentation for the Microsoft.TeamFoundation namespace is hard to find! I’m hoping that someone here has made use of these classes and can direct me to a solution to this problem.

If at all possible, I need to use .NET classes (eg. not Process.Start) as I really need to know when the build has finished as well. I can however set up a FileSystemWatcher object for this if this is asking too much.

  • 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-23T06:09:12+00:00Added an answer on May 23, 2026 at 6:09 am

    It turns out that the problem was unfortunately completely unrelated. The .NET 2 code that was to be updated had hard coded ‘Program Files’ into the devenv.exe file path – however the new computers are 64bit and Visual Studio 2010 is installed into ‘Program Files (x86)’!

    So this means that the above code sample DOES work and WILL allow me to build the solutions from C#. It’s not the object oriented way that I would have preferred to do it, but after all your comments, I’m just glad to have got it working at all.

    Thanks for your time everyone.

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

Sidebar

Related Questions

I have a large solution containing many C# projects. When I open the solution
I have a large solution containing many projects. Due to the size and number
I have several projects and a website in a large asp.net solution. In some
I have a number of solutions with a large number of projects in them.
I have a large solution, of some 320 projects, where even small changes to
Okay, so we have a rather large solution with about 8 different projects inside
We have a large VS 2010 solution that is mostly C# code but there
I have some very large (>4 GB) files containing (millions of) fixed-length binary records.
Essentially, I have a very large List containing in turn relatively large Dictionaries. So
I have a table containing a large number of rows. Each row has 2

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.