Msbuild 在WixProj引导程序中引用ProgramFiles文件夹
(我看了其他答案都没有用) 在我的WixProj文件中,有几个引导程序调用引用了必要的文件Msbuild 在WixProj引导程序中引用ProgramFiles文件夹,msbuild,wix,Msbuild,Wix,(我看了其他答案都没有用) 在我的WixProj文件中,有几个引导程序调用引用了必要的文件 <GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Case Tracking" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite" CopyComponents="False" OutputPath="$(Outp
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Case Tracking" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite" CopyComponents="False" OutputPath="$(OutputPath)" Path="$(env.ProgramFiles)\Microsoft SDKs\Windows\v8.1A\BootStrapper" ApplicationRequiresElevation="True" Culture="en-US" Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' " />
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Case Tracking" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite" CopyComponents="False" OutputPath="$(OutputPath)" Path="$(env.ProgramFiles)\Microsoft SDKs\Windows\v7.0A\BootStrapper" ApplicationRequiresElevation="True" Culture="en-US" Condition=" '$(Configuration)|$(Platform)' == 'Debug Web|x86' " />
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Case Tracking" BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite" CopyComponents="False" OutputPath="$(OutputPath)" Path="$(env.ProgramFiles)\Microsoft SDKs\Windows\v6.0A\BootStrapper" ApplicationRequiresElevation="True" Culture="en-US" Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' " />
上面代码的问题是,当它尝试构建时,我得到了错误
无法计算表达式“.ProgramFiles”。找不到方法“System.String.ProgramFiles”
那么如何在WixProj文件中引用ProgramFiles环境呢
该项目在本地正确生成-它无法通过MSBuild正确生成
谢谢在WixProj文件中,不需要“env.”。相反,您可以将其称为${ProgramFiles}\Microsoft
wxs文件中的引用可能需要使用$(env.ProgramFiles),但作为构建文件的WixProj使用内置常量 在WixProj文件中,不需要“env.”。相反,您可以将其称为${ProgramFiles}\Microsoft
wxs文件中的引用可能需要使用$(env.ProgramFiles),但作为构建文件的WixProj使用内置常量