views:

377

answers:

2

I need to shell out (to call svn commit on my .application file) after a ClickOnce publish. However I've not been able to find a way to hook it into my MSBuild .csproj file.

  • The PostBuild Event is too early
  • And calling 'start Some.exe' in PostBuild does not run in the background
  • And using the AfterBuild Target from MSBuild is done before the files are deployed.

Dang!

I used the pretty cool MSBuild SideKick to inspect my .csproj file and when I run from inside SideKick the AfterBuild target does in fact happen after build. Hoever; my shell out fails and I'd prefer for things to work from inside the IDE anyway.

Does anyone have any pearls of wisdom in this area?

A: 

We've used the task to shell out at different points in the build. This spawns a new instance of cmd.exe for you. I've used this to spawn PowerShell scripts in the background. It's nice since you can do a lot with PowerShell, just be sure to use stdout so the PS log shows up in your team build.

Adam Fyles
+3  A: 

Have you tried creating an AfterPublish target? You should create this target in your .csproj file after the statement.

Sayed Ibrahim Hashimi