如何验证是否已使用Installshield的MSBuild支持更新了产品代码和产品版本
我正在尝试使用MSBuild和TFS 2013构建InstallShield项目。我按照要求的步骤覆盖产品代码,如图所示。首先,我创建了一个.isproj文件并成功地生成了安装程序。然而,产品代码似乎没有改变。我检查了setup.ini文件,发现产品GUID仍然与.ism文件中产品代码的值相同。 是否有方法验证产品代码和产品版本是否已更改 @更新 它最终成功了,我能够使用验证新生成的产品代码 克里斯的剧本也很完美 我就是这样做的: 在我的ISM发布视图(build选项卡)中,我将发布位置设置为\Installer,而不是在我的路径变量中,我声明了一个ISBUILDDIR路径变量,并将其默认值设置为ISProjectDataFolder如何验证是否已使用Installshield的MSBuild支持更新了产品代码和产品版本,msbuild,build-automation,installshield,Msbuild,Build Automation,Installshield,我正在尝试使用MSBuild和TFS 2013构建InstallShield项目。我按照要求的步骤覆盖产品代码,如图所示。首先,我创建了一个.isproj文件并成功地生成了安装程序。然而,产品代码似乎没有改变。我检查了setup.ini文件,发现产品GUID仍然与.ism文件中产品代码的值相同。 是否有方法验证产品代码和产品版本是否已更改 @更新 它最终成功了,我能够使用验证新生成的产品代码 克里斯的剧本也很完美 我就是这样做的: 在我的ISM发布视图(build选项卡)中,我将发布位置设置为\
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build">
<PropertyGroup>
<MSIProductVersion>$([System.Text.RegularExpressions.Regex]::Match($(TF_BUILD_BUILDNUMBER), "\d+.\d+.\d+.\d+"))</MSIProductVersion>
<Configuration>Debug</Configuration>
<InstallShieldProductConfiguration>ProductConfigName</InstallShieldProductConfiguration>
<InstallShieldRelease>ReleaseName</InstallShieldRelease>
<InstallShieldProductVersion>$(MSIProductVersion)</InstallShieldProductVersion>
<MSIProductCode>$([System.Guid]::NewGuid().ToString("B").ToUpper())</MSIProductCode>
<InstallShieldBuildDependsOn>PreBuild</InstallShieldBuildDependsOn>
</PropertyGroup>
<ItemGroup>
<InstallShieldPathVariableOverrides Include="$(OutDir)">
<PathVariable>ISBUILDDIR</PathVariable>
</InstallShieldPathVariableOverrides>
</ItemGroup>
<ItemGroup>
<InstallShieldPropertyOverrides Include="$(MSIProductCode)">
<Property>ProductCode</Property>
</InstallShieldPropertyOverrides>
</ItemGroup>
<ItemGroup>
<InstallShieldProject Include="$(MSBuildProjectDirectory)\$(MSBuildProjectName).ism"/>
<InstallShieldMergeModulePath Include="$(MSBuildProjectDirectory)\MSM"/>
</ItemGroup>
<Target Name="PreBuild">
<Exec Command="attrib -s -h -r /s "$(MSBuildProjectDirectory)\*.*"" IgnoreExitCode="true" ContinueOnError="true"/>
</Target>
<Import Project="$(MSBuildExtensionsPath32)\InstallShield\2012\InstallShield.targets"/>
</Project>
$([System.Text.RegularExpressions.Regex]::匹配($(TF\u BUILD\u BUILDNUMBER),“\d+。\d+。\d+。\d+”)
调试
ProductConfigName
发布名称
$(MSIProductVersion)
$([System.Guid]::NewGuid().ToString(“B”).ToUpper())
预构建
ISBUILDDIR
产品代码
我想知道是否存在InstallShield错误。您能提取MSI并查看属性表中的ProductCode是否已更改吗?我刚刚尝试了下面的示例,但仍然无效:当我打开setup.ini文件时,产品GUID保持不变。但是,当我编辑.ism文件并使用IS接口构建它时,它就可以工作了。产品代码更改。请注意,我现在使用的是试用版。会因为这个吗?因此,试用版将生成setup.exe文件而不是.msi。我试图用Orca签出属性表,但它不解析.exe文件。当运行setup.exe时,它会将MSI提取到临时目录。从那里抓住它,用奥卡检查一下。如果产品代码在MSI中正确,但在INI中不正确,则这是一个is错误,您必须在构建之前更新ISM。