4

I'm building an application that needs to be able to, on a command, publish itself to a specified directory.

I'm looking for something like

System.BuildSystem.Build(<project file>, 'release');
System.BuildSystem.Publish(<project file>, <destination folder>);

Is this possible?

alumb
  • 4,401
  • 8
  • 42
  • 52

1 Answers1

2

Take a look at msbuild or nant. Personally, I use msbuild to push releases to our QA environment and create packages to be rolled out to production.

Your application could, for example, call batch files that run msbuild scripts to produce and publish builds.

rsbarro
  • 27,021
  • 9
  • 71
  • 75
  • 1
    The nice thing about MSBuild is your proj files are already in MSBuild format, so chances are they will drop right in and just work. – Matt Greer Feb 10 '11 at 18:40
  • I was hoping there was something in the language / framework. I'm always hesitant to use System.Diagnostics.Process.* – alumb Feb 10 '11 at 18:58
  • I've never heard of anything in the framework to do that. Launching a separate app to do the build should be manageable though. One app that uses MSBuild like that is CruiseControl.NET. We use that at my work on our build server, and it just runs msbuild as a separate process. From there you can compile, version, publish (we do this using the Web Deployment projects), do web.config transforms. It really works well for us. – rsbarro Feb 10 '11 at 20:30