我正在構建一個將json.net添加到GAC的Wix安裝程序(我知道... GAC不好,但訂單是訂單)。在構建我得到這個錯誤:LGHT0132使用Wix將Json.Net添加到GAC
error LGHT0132: The assembly file 'path\Newtonsoft.Json.dll' appears to be invalid. Please ensure this is a valid assembly file and that the user has the appropriate access rights to this file. More information: HRESULT: 0x8013101b
我使用的json.net是.NET 4如果我使用json.net用於.NET 2它建立正常,沒有任何問題的。
我登記這樣簡單:
<Component Id="newtonsoft.json.gac.comp" Directory="GAC">
<File Id="newtonsoft.json.gac.file" KeyPath="yes" Assembly=".net" Source="path\Newtonsoft.Json.dll" />
</Component>
我使用維克斯3.5。任何想法,將不勝感激。
好的,我想出了我的錯誤。我正在使用psake構建腳本,並將框架版本設置爲3.5。非常明顯,這是行不通的。感謝Rob的幫助。我用這個單獨的dll創建了一個小項目,它工作。之後,我知道我不得不在某個地方搞混了。 –