CefSharp(v57.0.0)を使用してHTMLをPDFファイルにレンダリングする小さなサービスを作成しようとしていて、プロジェクトの "Any CPU" Feature Request - Add AnyCPU Support)。 は私のプロジェクトで、私は(それが初期化中CefSharp.Core.dll、CefSharp.dllをロードします)正常に動作するよう、以下のアセンブリリゾルバを使用:CefSharp NuGetパッケージ、AnyCPUがファイルを見つけることができません
// Will attempt to load missing assembly from either x86 or x64 subdir
private static Assembly Resolver(object sender, ResolveEventArgs args)
{
if (args.Name.StartsWith("CefSharp", StringComparison.Ordinal))
{
string assemblyName = args.Name.Split(new[] { ',' }, 2)[0] + ".dll";
string archSpecificPath = Path.Combine(
AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
Environment.Is64BitProcess ? "x64" : "x86",
assemblyName);
var outputAssembly = File.Exists(archSpecificPath) ? Assembly.LoadFile(archSpecificPath) : null;
return outputAssembly;
}
return null;
}
を私のような正確に同じ値を設定しCefSharpの初期化について例では:私は私の簡単なテストを開始した場合
var settings = new CefSettings()
{
// By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
};
// Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
はしかし、私は、次のエラーコードを取得する:
Message: System.Exception : Unable to locate required Cef/CefSharp dependencies:
Missing:CefSharp.BrowserSubprocess.exe
Missing:CefSharp.BrowserSubprocess.Core.dll
Missing:CefSharp.Core.dll
Missing:CefSharp.dll
Missing:icudtl.dat
Missing:libcef.dll
Executing Assembly Path:D:\projects\CefService\bin\Debug\x86
happeかもしれないものの任意のアイデアここに来て問題を解決する方法は?
小アップデート:私は今の "x86" または "x64の" ターゲットを使用するように私のプロジェクトを変更したI場合に動作し、(上記のリンクの説明のように)メインプログラムから変換メソッドを呼び出します。 しかし、NUnitから呼び出すと、プログラムがクラッシュします。 – Octoate
別のアップデート:CefSharpで2日間プレイした後、私たちはそれをスキップして商用ツールを使用することにしました。それは箱の外で働いて、私は1時間以内に必要な機能を実装するためにablteでした。 – Octoate