Results 1 to 3 of 3

Thread: [02/03] Run batch build from Executable/batch file

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    [02/03] Run batch build from Executable/batch file

    I have a project that contains 9-10 other projects. When we modify our code our custumers have to open VS and build all of the projects to get new versions of our libraries (yes the customer gets source code and have the oppportunity to add their own changes to our code...That's another story though). To simplify things I want to provide a gui/batch file that can be used to build every sub project in the main project.

    Is this possible? More to the point would be whether there is a way to build a single project without opening Visual Studio. I assume that if I can do one then I can do ten.

    I hope this makes sense to someone because I think that I just confused myself.

    BTW. The I have the same question for dev studio 6 and VS 2005.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [02/03] Run batch build from Executable/batch file

    MSBuild was introduced for .NET 2.0.

    http://msdn2.microsoft.com/en-us/library/0k6kkbsd.aspx

    I use it, but not in the traditional sense. I actually shell it as a process and compile my projects on the fly without VS being open.

    I don't think this works in .NET 1.1, but it works in 2.0 and Orcas.

    I launch
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe
    using process.start()

    and I pass in the path of my sln file along with
    /t:Rebuild and /p:Configuration=Release

    So it rebuilds the project, and in release mode.

    You could likely call the compiler (vbc) directly for .NET 1.1, but the amount of arguments to do that is generally pretty crazy... That is why I like MSBuild, because I can just pass it a solution file (and 2 params), and it builds it just like the VS IDE does.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    Re: [02/03] Run batch build from Executable/batch file

    That's pretty sweet for projects built with managed code. I could easily do what I want with my 2005 projects that are based on .net framework.

    Unfortunatley most of our code is unmanaged. Our customers use the microsoft studio IDE to build thier projects but do not want to switch to .net because of legacy code rewrite and/or the fear the .net cannot run in real time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width