我有一个非常简单的设置项目:
<Product Id="*" UpgradeCode="$(var.UpgradeCode)" Name="$(var.ProductLongName)" Language="1033"
Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<!-- Installation Parts -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WindowsFolder">
<Component Id="ProductComponent" Guid="b3250107-4859-4d5f-857c-1756af65ec32">
<File Id='SomeFile' Name='SomeFile.scr'
Source='SomeFile.scr' Vital='yes' />
<!-- Other files -->
</Component>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="$(var.ProductShortName)" Level="1">
<ComponentRef Id="ProductComponent" />
<!-- Note: The following ComponentGroupRef is required to pull in generated authoring from project references. -->
<ComponentGroupRef Id="Product.Generated" />
</Feature>
<!-- Prerequisites -->
<PropertyRef Id="NETFRAMEWORK40CLIENT"/>
<Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40CLIENT]]>
</Condition>
</Product>
安装好,卸载似乎也完成了,但所有文件都保留。它们不会被删除 有什么想法吗?
答案 0 :(得分:7)
所以,当我将组件guid更改为新生成时,这个问题就消失了。真的不明白为什么。怪异。
答案 1 :(得分:1)
OP中的组件GUID全部为小写。按照惯例,MSI希望GUID全部为大写,以防您需要将GUID作为(公共)属性传递到服务边界。你的新GUID是否大概都是大写的?