代码之家  ›  专栏  ›  技术社区  ›  rupweb

系统IO。具有Pivotal的FileNotFoundException。Gemfire。dll

  •  1
  • rupweb  · 技术社区  · 8 年前

    我正在安装一个C#windows服务,该服务使用 Geode 安装到UAT Windows 2012服务器上。被引用的dll(如log4net、newtonsoft.json和QuickFix)除了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,未找到 加库蒂尔 可执行文件。因此,我尝试使用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")
    

    我试过了 regsvr32 Pivotal.Gemfire.dll

    我已经尝试编译并运行GacInstall可执行文件 https://github.com/apache/geode-native/tree/develop/executables/GacInstall 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 , Apache.Geode.Client 根据 Implementing Shared Assembly

    有什么想法吗?谢谢

    更新:

    enter image description here

    5 回复  |  直到 4 年前
        1
  •  1
  •   rupweb    8 年前

    我下载了Geode的早期版本9.0.7,叫做Gemstone。Gemfire。隐藏物dll,并得到了相同的错误,但该版本包括一个宝石。Gemfire。隐藏物xml在同一目录中。如果我将xml文件带到bin目录,错误就会停止,服务也会正常启动。

    like this 问题是dll附带了一个冗余的xml文件。我通过创建一个新的虚拟xml文件修复了这个问题。Gemfire。xml

    <?xml version="1.0"?>
    <doc>
    </doc>
    
        2
  •  1
  •   Edgaras    7 年前

    对我来说,有标记的答案不起作用。

    我不得不下载 DependencyWalker 这让我明白了为什么 Pivotal.Gemfire.dll 没有工作。缺失的DLL之一来自:

    Visual C++ Redistributable Packages for Visual Studio 2013

        3
  •  0
  •   rupweb    8 年前

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

    返回的 Assembly successfully added to the cache Pivotal.Gemfire.dll 我不能进入GAC是因为 a strong name issue . 这种将早期版本的dll放入GAC的奇怪解决方法允许GAC查找并使用较新版本。。。

        4
  •  0
  •   rupweb    5 年前

    enter image description here

    问题与 How can I install a Visual Studio C++ redistributable if it is missing? 答案是要么获取dll的发布版本,要么转到Visual Studio安装程序,修改,导航到单个组件->编译器、构建工具和运行时,并检查MSVC v 140与2015 C++构建工具

    enter image description here

        5
  •  0
  •   rupweb    5 年前