Can Visual Studio post build events be used with ClickOnce publishing? -
in visual studio 2008, can post-build event used clickonce publishing? if so, how?
out of box, looks can use pre-build events , clickonce publishing seems build project different location, before post build event launched.
looking @ msbuild files visual studio uses, post build event run build target. if run msbuild command-line , call publish target directly, calls build first. if right-click on project in vs , click publish, trimmed-down target called publishonly gets run, on assumption vs has done build.
your post build event should run visual studio when automatically builds project prior publishing. in build events tab of project's properties, did set event "run always"?
if want more explicit happens prior publishing, there's beforepublish target publish looks for, whether it's run msbuild or visual studio. edit project file hand, , @ bottom you'll see couple of commented-out target elements. add 1 of own this:
<target name="beforepublish"> <exec condition="'$(postbuildevent)' != ''" workingdirectory="$(outdir)" command="$(postbuildevent)" /> </target>
that run same post build event defined in project, put msbuild tasks inside target elements.
Comments
Post a Comment