This project has moved and is read-only. For the latest updates, please go here.

Running a custom command after deployment

Topics: General Questions
Oct 13, 2010 at 4:25 PM

I'm trying to run a command after the deployment. there are no no errors building or deploying but the action I think should happening does not appear to be. Below is what I added to the bdtfproj; any help would be greatly appreciated :)

 

         ...

    <Target Name="CustomDeployTarget">
        <Exec Command="regedit /S somefile.reg"></Exec>
    </Target>
</Project>

Oct 13, 2010 at 6:13 PM

Do you see any reference to CustomDeployTarget in your MSBuild output?  You've got the right target name.

Oct 13, 2010 at 6:27 PM

I did find something ...

            Target CustomDeployTarget:
                regedit /S somefile.reg

 

But no output. I took a guess and figured the reg file might not have been pathed correctly and that is what it was. How can I get the log to show output from that?

Oct 13, 2010 at 6:53 PM

Glad to hear that it's working.  I should have thought to mention this right away, but since regedit is a regular Windows GUI app vs. a command-line app, it doesn't write any output to the command line and there is nothing for MSBuild to capture.  If you want to capture the results in the build output, you'd need to use MSBuild tasks or a command-line app to create the registry keys.

I already import the SDC Tasks library, so any of those tasks should be available for you to use.  They have a Registry task (Microsoft.Sdc.Tasks.Registry.*).  For documentation: http://sdctasks.codeplex.com.

Thanks,
Tom

 

Oct 21, 2010 at 5:33 PM

I'll try that, thank you