2017-08-25 50 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找到并使用更高版本...

相关问题