如何控制 ClickOnce 应用程序的输出生成位置(使用 Microsoft.Build.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”没有被更新。
I have a ClickOnce WPF application that I am using Microsoft.Build.BuildEngine to build. Everything appears to be working correctly, but when doing a targeted build to publish the application it is putting the published output to .\bin\Release\app.publish
This is despite setting the properties "PublishURL", "OutDir", "WebProjectOutputDir" - is there another property that I can set to accomplish this?
Is there a way to control where the app.publish directory is created?
projectToBuild.SetProperty("OutDir", workingDirectory);
projectToBuild.SetProperty("WebProjectOutputDir", workingDirectory);
projectToBuild.SetProperty("PublishURL", workingDirectory);
projectToBuild.Build("publish");
It looks like it always publishes to "OutputPath"\app.publish I've tried the following:
var myOutputPath1 = projectToBuild.GetEvaluatedProperty("OutputPath");
projectToBuild.SetProperty("OutputPath", workingDirectory);
var myOutputPath2 = projectToBuild.GetEvaluatedProperty("OutputPath");
Unfortunately myOutputPath1 and myOutputPath2 are the same, it appears the "OutputPath" is not being updated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论