本文介绍了WiX - 未定义的预处理器变量 '$(var.SetupProject1.TargetDir)'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注

Product.wxs

ProductComponent.wxs

解决方案

只需删除第二个文件 ProductComponent.wxs 就可以了.

该博客中提到的外部工具是一个好主意,但只能通过激活您的 winform 项目而不是您当前的项目(wix 项目)来运行.

I'm following this tutorial to create a WiX installer for a VS2017 Winform app. It's just a default Winform app (nothing fancy). But when I build the WiX project (SetupProject1 shown in figure 1 below), I get the following error at first <File id=.../> tag of ProductComponent.wxs (shown below).

Question: What I may be missing here?

Note: I'm using this Wix Toolset Visual Studio 2017 Extension

Error:

VS2017 Solution Explorer:

Product.wxs

<?

ProductComponent.wxs

<?
解决方案

Just remove your second file ProductComponent.wxs should be OK.

The external tool mentioned on that blog is a good idea, but that should only be run by activating your winform project not your current project (the wix project).

这篇关于WiX - 未定义的预处理器变量 '$(var.SetupProject1.TargetDir)'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 22:17