Note that despite the chosen method, everything eventually calls the MSBuild tasks. So, for the cleanest solution you should just cut straight to the chase and call the MSBuild tasks, right? Ah, but here's the rub -- you have to determine what your application manifest is and feed this list to the GenerateApplicationManifest task via an ItemGroup. You really don't want to have this fixed list that you have to maintain but rather have the application manifest dynamically generated for you. This is the real value of mage.exe which you can point to a directory and it will build-up the app manifest for you. Where mage is less than useful is generating the deployment manifest but you can just use the MSBuild task to do this instead. This sample demonstrates how to use mage.exe in conjunction with the ClickOnce MSBuild tasks to resolve the deficiencies with the Visual Studio approach. The sample consists of a simple Windows app which displays a value stored externally in the application's App.config file. Note that in this sample there are three versions of this file (stored under the Config directory) -- a "development" version, a "qa" (i.e. test) version, and a "production" version. They are structurally identical, the only varying bits are the values. There is also a satellite class library that is late-bound instantiated and invoked when a button is pressed on the app. There is no reference to this assembly from the Windows app.In my shop we run the deploy scripts seperately from the build scripts but you could easily tack this on to the end of your build process if so desired. Have fun!
Download Sample
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u