如何将 WIX 项目中的二进制文件的输入路径设置为 TFS 上的 MSBuild 输出路径?

发布于 2024-09-13 11:23:44 字数 285 浏览 1 评论 0原文

我希望 MSBuild 构建包含来自另一个项目的输出文件夹的静态文件和二进制文件的 WIX 3.5 项目。对于静态文件,一切都工作得很好:我只需将 File 元素的 Source 属性设置为“..\AnotherProject\Static\StaticFile.ext”,我无法引用二进制文件,因为它们不在“..\AnotherProject”中\bin\Release\" 文件夹,它们位于 MSBuild 输出文件夹中,我不知道如何引用。 唯一的方法是在 .wixproj 文件中为发布构建配置设置一些变量,然后使用它,但这似乎是错误的。我想念什么?

I want MSBuild to build WIX 3.5 project containing static files and binaries from another project's output folder. While with static files it all works just fine: I just set Source attribute of File element to "..\AnotherProject\Static\StaticFile.ext", I can't reference binaries, because they aren't in "..\AnotherProject\bin\Release\" folder, they're in MSBuild output folder which I don't know how to reference.
The only way to do so is set some variable in .wixproj file in for Release build configuration and then use it, but it seems wrong. What do I miss?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

违心° 2024-09-20 11:23:47

你想要“绑定路径”。文档对此不太了解,但您可以在 Light MSBuild 任务上指定 BindInputPaths。任何以“SourceDir\”开头或相对路径(不以“X:\”或“\”开头)的 File/@Source 或 @SourceFile 都将在这些绑定路径中搜索。您可以使用 MSBuild 变量来正确设置 BindInputPaths。

You want "bind paths". The documentation isn't great about this but you can specify BindInputPaths on the Light MSBuild Task. Any File/@Source or @SourceFile that starts with "SourceDir\" or is a relative path (doesn't start with an "X:\" or "\") will be searched in those bind paths. You can use MSBuild variables to get the BindInputPaths set correctly.

茶底世界 2024-09-20 11:23:47

尝试 $(var.Web.TargetDir) - 工作。

Tried $(var.Web.TargetDir) - working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文