현재 CefSharp (v57.0.0)를 사용하여 HTML을 PDF 파일로 렌더링하고 지침에 따라 프로젝트의 "모든 CPU"를 사용하는 소규모 서비스를 작성하려고합니다. Feature Request - Add AnyCPU Support). CefSharp의 초기화를 들어 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.Core.dll, CefSharp.dll로드) 잘 작동하는 것 같다하여 다음 해결 프로그램을 사용 예제에서 :
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 무엇을 수 있습니다을 여기서 문제를 해결하고 문제를 해결하는 방법?
작은 갱신 : 지금 "86"또는 "64"목표를 이용할 수 있도록 프로젝트를 변경 한 나는 경우 작동, (위에 링크 설명 등) 주 프로그램에서 변환 방법을 호출하십시오. 그러나 NUnit에서 호출하면 프로그램이 중단됩니다. – Octoate
또 다른 업데이트 : CefSharp를 2 일 동안 사용하다가 건너 뛰고 상용 도구를 사용하기로 결정했습니다. 그것은 상자 밖으로 일했고 1 시간 이내에 필요한 기능을 구현하기 위해 ablte했습니다. – Octoate