LibraryNotInstalledException需要本机

LibraryNotInstalledException需要本机

本文介绍了在32位进程下运行的GhostscriptLibraryNotInstalledException需要本机库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2013中使用nuget,我在Windows x64 PC上的项目中安装了 Ghostscript.NET .

Using nuget in Visual Studio 2013, I installed Ghostscript.NET into my project on my Windows x64 PC.

只是为了确保我没有疯,所以我检查了它:

Just to make sure I wasn't crazy, I checked it:

PM> Install-Package Ghostscript.NET
'Ghostscript.NET 1.2.0' already installed.
Project already has a reference to 'Ghostscript.NET 1.2.0'.

PM>

该项目由多个开发人员使用.它以任何CPU为目标,并且需要保持这种状态.

The project is used by multiple developers. It targets Any CPU, and needs to remain that way.

这是我的代码:

public static void GhostscriptNetProcess(String fileName, String outputPath)
{
    var version = GhostscriptVersionInfo.GetLastInstalledVersion();
    var source = (fileName.IndexOf(' ') == -1) ? fileName : String.Format("\"{0}\"", fileName);
    var output_file = (outputPath.IndexOf(' ') == -1) ? outputPath : String.Format("\"{0}\"", outputPath);
    var gsArgs = new List<String>();
    gsArgs.Add("-q");
    gsArgs.Add("-dNOPAUSE");
    gsArgs.Add("-dNOPROMPT");
    gsArgs.Add("-sDEVICE=pdfwrite");
    gsArgs.Add(String.Format(@"-sOutputFile={0}", output_file));
    gsArgs.Add("-f");
    gsArgs.Add(source);
    var processor = new GhostscriptProcessor(version, false);
    processor.Process(gsArgs.ToArray());
}

每当我尝试调试应用程序时,都会收到以下错误消息:

Whenever I attempt to debug the application, I get the following error message:

其他信息:此托管库正在32位进程下运行,并且需要在此计算机上安装32位Ghostscript本机库!要下载适当的Ghostscript本机库,请访问: http://www.ghostscript.com/download/gsdnld. html

Additional information: This managed library is running under 32-bit process and requires 32-bit Ghostscript native library installation on this machine! To download proper Ghostscript native library please visit: http://www.ghostscript.com/download/gsdnld.html

查找 Ghostscript.NET.GhostscriptLibraryNotInstalledException 没有提供任何有用的信息,尽管此在CodeProject上发布的帖子表明调试器以32位模式运行,而我安装了64位版本.

Looking up the Ghostscript.NET.GhostscriptLibraryNotInstalledException did not provide any useful information, though this post on CodeProject indicated that the debugger is running in 32-bit mode whereas I have the 64-bit version installed.

推荐答案

您确实安装了Ghostscript吗?

Have you actually installed Ghostscript ?

Ghostscript.NET仅仅是Ghostscript的.NET接口,在我看来就像消息:

Ghostscript.NET is merely a .NET interface to Ghostscript, it looks to me like the message:

该托管库正在32位进程下运行,并且需要在此计算机上安装32位Ghostscript本机库!要下载正确的Ghostscript本机库,请访问: http://www.ghostscript.com/download/gsdnld.html "

"This managed library is running under 32-bit process and requires 32-bit Ghostscript native library installation on this machine! To download proper Ghostscript native library please visit: http://www.ghostscript.com/download/gsdnld.html"

试图告诉您您没有安装32位版本的Ghostscript.它甚至会告诉您下载副本的位置.

is trying to tell you that you don;t have a 32-bit version of Ghostscript installed. It even tells you where to go to download a copy.

那么您已经安装了Ghostscript吗?您是否安装了32位版本的Ghostscript?

So have you installed Ghostscript ? Have you installed the 32-bit version of Ghostscript ?

这篇关于在32位进程下运行的GhostscriptLibraryNotInstalledException需要本机库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 20:04