开发者

How do I publish a ClickOnce application using Microsoft.Build.BuildEngine

开发者 https://www.devze.com 2022-12-08 22:01 出处:网络
I have a WPF, ClickOnce application that I am trying to build using the Microsoft.Build.BuildEngine. I believe my question actually boils down to \"how do I do the command line /target:publis开发者_开

I have a WPF, ClickOnce application that I am trying to build using the Microsoft.Build.BuildEngine.

I believe my question actually boils down to "how do I do the command line /target:publis开发者_开发技巧h using Microsoft.Build.BuildEngine"?

I've tried the following

projectToBuild.SetProperty("PublishUrl", myPublishUrl);
projectToBuild.Targets.AddNewTarget("publish");

but I'm really just guessing at those properties based on the command line properties I'm setting to publish the ClickOnce application.


The Targets.AddNewTarget appears to be the mechanism for creating a new target.

It appears that the mechanism to build to a target is to use the string parameter on the .Build():

projectToBuild.Build("publish");
0

精彩评论

暂无评论...
验证码 换一张
取 消