如何控制ClickOnce应用程序的输出构建位置(使用Microsoft.Build.BuildEngine)?

时间:2009-10-13 04:09:04

标签: .net wpf clickonce msbuild-buildengine

我有一个ClickOnce WPF应用程序,我正在使用Microsoft.Build.BuildEngine来构建。一切似乎都正常工作,但在进行目标构建以发布应用程序时,它将发布的输出放到。\ bin \ Release \ app.publish

尽管设置了“PublishURL”,“OutDir”,“WebProjectOutputDir”属性,但我可以设置另一个属性来实现此目的吗?

有没有办法控制app.publish目录的创建位置?

projectToBuild.SetProperty("OutDir", workingDirectory);
projectToBuild.SetProperty("WebProjectOutputDir", workingDirectory);
projectToBuild.SetProperty("PublishURL", workingDirectory);
projectToBuild.Build("publish");

看起来它总是发布到“OutputPath”\ app.publish我尝试了以下内容:

var myOutputPath1 = projectToBuild.GetEvaluatedProperty("OutputPath");
projectToBuild.SetProperty("OutputPath", workingDirectory);
var myOutputPath2 = projectToBuild.GetEvaluatedProperty("OutputPath");

不幸的是myOutputPath1和myOutputPath2是相同的,看起来“OutputPath”没有被更新。

0 个答案:

没有答案