0
我有一個插件(在後臺運行的服務),我需要在各種計算機上安裝。我需要根據安裝的.Net版本安裝不同的服務版本。最佳實踐WIX有條件安裝版本的軟件
的.Net 3.5獲得3.5版本的插件 的.NET 4.5得到4.5版本的插件,等
我知道如何使用各種NETFRAMEWORK ...性能檢測維克斯的.Net版本,但我米有麻煩,安裝插件的所有版本,而不是我想要的。
<Feature Id="ProductFeature451" Title="Plugin" Level="1">
<Condition Level="1">
<![CDATA[REMOVE~="ALL" OR (NETFRAMEWORK45 >= "#378675")]]>
</Condition>
<ComponentGroupRef Id="ProductComponents451" />
</Feature>
<Feature Id="ProductFeature40" Title="Plugin" Level="1">
<Condition Level="1">
<![CDATA[REMOVE~="ALL" OR (NETFRAMEWORK45 < "#378675" AND NETFRAMEWORK40FULL) ]]>
</Condition>
<ComponentGroupRef Id="ProductComponents40" />
</Feature>
<Feature Id="ProductFeature351" Title="Plugin" Level="1">
<Condition Level="1">
<![CDATA[REMOVE~="ALL" OR (NETFRAMEWORK35 AND NOT NETFRAMEWORK45 AND NOT NETFRAMEWORK40FULL) ]]>
</Condition>
<ComponentGroupRef Id="ProductComponents351" />
</Feature>
我試過使用「安裝」而不是REMOVE〜=「ALL」,但同樣的問題。我有錯的地方嗎?
在之前的嘗試中,我遇到了「引用計數」問題,因爲我試圖將各種插件安裝到同一目錄中,所以現在我試圖根據插件的版本安裝到不同的目錄中。
實際上,安裝所有版本並不是世界末日,但我需要只爲適當的版本創建/運行該服務。
任何想法?