2017-08-25 48 views
0

我安裝使用Geode到UAT的Windows 2012服務器中的C#窗口服務。引用的DLL(如log4net的,newtonsoft.json和QuickFix的),不同的是對Pivotal.Gemfire.dllSystem.IO.FileNotFoundException與Pivotal.Gemfire.dll

當我啓動服務,我得到System.IO.FileNotFoundException: Could not load file or assembly 'Pivotal.Gemfire.dll' or one of its dependencies. The specified module could not be found. File name: 'Pivotal.Gemfire.dll'

工作現在Gacutil不來與Win Server 2012的我已經嘗試安裝Windows SDK和.Net SDK,但未找到可執行文件Gacutil。所以,我已經試過使用PowerShell這樣的DLL來進入GAC:

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") 
$publish = New-Object System.EnterpriseServices.Internal.Publish 
$publish.GacInstall("D:\Pivotal.Gemfire.dll") 

我在各種口味

我已經試過編譯和https://github.com/apache/geode-native/tree/develop/executables/GacInstall運行GacInstall可執行試圖regsvr32 Pivotal.Gemfire.dll。它說Installation completed successfully.但是當我嘗試運行服務,或嘗試PowerShell的:

([system.reflection.assembly]::loadfile("D:\Pivotal.Gemfire.dll")).FullName

我得到同樣的錯誤。

我使用運行時組件結合

<runtime> 
<assemblyBinding 
    xmlns="urn:schemas-microsoft-com:asm.v1"> 
    <dependentAssembly> 
    <assemblyIdentity name="Apache.Geode" publicKeyToken="null" culture="neutral" /> 
    <codeBase version="9.1.1-build.2" href="file://Pivotal.Gemfire.dll"/> 
    </dependentAssembly> 
</assemblyBinding> 
</runtime> 

和名稱Pivotal.Gemfire的各種口味根據Implementing Shared Assembly,但總是相同的錯誤嘗試的私人集會,Apache.Geode.Client

任何想法?謝謝...

回答

0

我下載的是以前版本的Geode,9.0.7,叫Gemstone.Gemfire.Cache.dll並得到了同樣的錯誤,但該版本包含在同一個目錄中的Gemstone.Gemfire.Cache.xml 。如果我將xml文件放到我的bin目錄中,錯誤就會停止並且服務正常啓動。

所以like this這個問題是多餘的陪同xml文件的DLL。我通過創建一個新的虛擬的XML文件Pivotal.Gemfire.xml

<?xml version="1.0"?> 
<doc> 
</doc> 
0

此問題的另一個安裝又發生了固定的問題。上面使用的XML文件並沒有解決這個問題的答案,它是通過下載本機客戶端,Gemstone.Gemfire.Cache.dll的版本9.0.7,然後運行

.\gacutil /if C:\FIX\IsFix\Gemstone.Gemfire.Cache.dll

其返回Assembly successfully added to the cache然後移除解決早期版本的dll,但保留了由於a strong name issue而無法進入GAC的更高版本Pivotal.Gemfire.dll。這個讓早期版本的dll進入GAC的奇怪解決方法允許GAC找到並使用更高版本...

相關問題