我創建了一個使用2個不同資源文件來管理UI語言的多語言應用程序,因此當我構建並執行我的程序時,在我的bin目錄中我有我的應用程序文件和兩個文件夾, en-GB和pt-PT。在wix安裝程序中添加資源文件
現在我想創建與維克斯一個安裝程序,對於我定義了以下目錄:
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="App" >
<Directory Id="LOCALEEN" Name="en-GB"/>
<Directory Id="LOCALEPT" Name="pt-PT"/>
</Directory>
</Directory>
</Directory>
</Fragment>
然後,我定義了以下組件:
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="App.resources.en.GB.dll" Guid="...">
<CreateFolder />
<File Id="App.resources.en.GB.dll" Name="App.resources.dll" Source="$(var.App.App_TargetDir)en-GB\App.resources.dll" />
</Component>
<Component Id="App.resources.pt.PT.dll" Guid="...">
<CreateFolder />
<File Id="App.resources.pt.PT.dll" Name="App.resources.dll" Source="$(var.App.App_TargetDir)pt-PT\App.resources.dll" />
</Component>
... Other components...
</ComponentGroup>
</Fragment>
當我重建我的解決方案我得到以下錯誤:
'App.resources.dll' is installed in '[ProgramFilesFolder]\App\' by two different components on an LFN system: 'App.resources.en.GB.dll' and 'App.resources.pt.PT.dll'. This breaks component reference counting.
我明白這個問題,無論是水庫ources DLL正在被複制到安裝文件夾,而不是特定的資源文件...但我不知道如何解決它。任何人都可以提供關於如何解決這個問題的提示?
是的,這是做的伎倆,謝謝。 – lulas