5

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?

2
  • But you just answered your own question! Commented Feb 10, 2011 at 20:31
  • How did I answer my own question? Those are not valid C# functions. My question was, what C# functions would accomplish this pseudo-code. Commented Feb 10, 2011 at 21:46

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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.
I was hoping there was something in the language / framework. I'm always hesitant to use System.Diagnostics.Process.*
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.