发布无法加载文件或程序集CefSharp.Core.dll [英] Publish Could not load file or assembly CefSharp.Core.dll

查看:193
本文介绍了发布无法加载文件或程序集CefSharp.Core.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#Windows窗体应用程序中使用CefSharp,当我从Visual Studio中运行它时,它运行良好,但是当我使用FTP帐户作为发布文件夹并使用url作为安装文件夹url进行发布时

但是我遇到以下错误,

我遵循了手册中的所有内容,并将所需的文件复制到bin文件夹中(CefSharp.BrowserSubprocess.Core.dll,CefSharp.BrowserSubprocess.exe,CefSharp.Core.dll,CefSharp.dll,CefSharp.WinForms.dll,icudtl.dat,libcef.dll)

不幸的是,什么都不起作用,问题出在哪里?

 有关调用的详细信息,请参见此消息的末尾即时(JIT)调试,而不是此对话框.**************例外文字**************System.IO.FileNotFoundException:无法加载文件或程序集'CefSharp.Core.dll'或其依赖项之一.指定的模块无法找到.文件名:'CefSharp.Core.dll'在mibrsdmapp.webBrowserForm.InitializeChromium()在mibrsdmapp.webBrowserForm..ctor()在mibrsdmapp.MeetingManager.btnCreate_Click(对象发送者,EventArgs e)处在System.Windows.Forms.Control.OnClick(EventArgs e)在System.Windows.Forms.Button.OnClick(EventArgs e)在System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)在System.Windows.Forms.Control.WmMouseUp上(消息和m,鼠标按钮按钮,Int32单击)在System.Windows.Forms.Control.WndProc(Message& m)在System.Windows.Forms.ButtonBase.WndProc(Message& m)在System.Windows.Forms.Button.WndProc(Message& m)在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)处在System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)处在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)**************装配体**************mscorlib程序集版本:4.0.0.0Win32版本:4.8.4180.0建于:NET48REL1LAST_B代码库:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll----------------------------------------系统程序集版本:4.0.0.0Win32版本:4.8.4001.0创建人:NET48REL1LAST_C代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll----------------------------------------mibrsdmapp程序集版本:1.0.0.0Win32版本:1.0.0.0代码库:file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/mibrsdmapp.exe----------------------------------------System.Windows.Forms程序集版本:4.0.0.0Win32版本:4.8.4150.0建于:NET48REL1LAST_C代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------系统绘图程序集版本:4.0.0.0Win32版本:4.8.3752.0创建人:NET48REL1代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------系统配置程序集版本:4.0.0.0Win32版本:4.8.4190.0建于:NET48REL1LAST_B代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------系统核心程序集版本:4.0.0.0Win32版本:4.8.4180.0建于:NET48REL1LAST_B代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll----------------------------------------系统文件程序集版本:4.0.0.0Win32版本:4.8.3752.0创建人:NET48REL1代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------牛顿软件程序集版本:12.0.0.0Win32版本:12.0.3.23909代码库:file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/Newtonsoft.Json.DLL----------------------------------------RestSharp程序集版本:106.11.4.0Win32版本:106.11.4代码库:file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/RestSharp.DLL----------------------------------------System.Runtime.Serialization程序集版本:4.0.0.0Win32版本:4.8.4180.0建于:NET48REL1LAST_B代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll----------------------------------------系统数值程序集版本:4.0.0.0Win32版本:4.8.3752.0创建人:NET48REL1代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll----------------------------------------系统数据程序集版本:4.0.0.0Win32版本:4.8.4190.0建于:NET48REL1LAST_B代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll----------------------------------------System.Web程序集版本:4.0.0.0Win32版本:4.8.4075.0创建人:NET48REL1LAST代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll----------------------------------------系统部署程序集版本:4.0.0.0Win32版本:4.8.3752.0创建人:NET48REL1代码库:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll----------------------------------------CefSharp.WinForms程序集版本:83.4.20.0Win32版本:83.4.20.0代码库:file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/CefSharp.WinForms.DLL----------------------------------------************** JIT调试**************要启用即时(JIT)调试,为此的.config文件应用程序或计算机(machine.config)必须具有在system.windows.forms部分中设置的jitDebugging值.该应用程序还必须通过调试进行编译已启用.例如:<配置>< system.windows.forms jitDebugging =" true"/></configuration>启用JIT调试后,任何未处理的异常将被发送到计算机上注册的JIT调试器而不是由此对话框处理. 

解决方案

我设法收集了提到的所有必需文件

现在在.csproj中,并且在我添加的</Project> 之前

 < ItemGroup>< Content Include =" $(SolutionDir)packages \ dll \ ** \ *.*>< Link>%(RecursiveDir)%(Filename)%(Extension)</Link>< Visible> false</Visible></内容></ItemGroup> 

发布后应用程序很麻烦并且已解决

I'm using CefSharp in my C# Windows form Application and it's working well when I run it from visual studio, but when I publish it using FTP account as publish folder and url as installation folder url

but I'm getting the following error,

I followed everything in the manual and copied the needed files into bin folder (CefSharp.BrowserSubprocess.Core.dll, CefSharp.BrowserSubprocess.exe, CefSharp.Core.dll, CefSharp.dll, CefSharp.WinForms.dll, icudtl.dat, libcef.dll)

unfortunately nothing works, where is the problem?

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.
File name: 'CefSharp.Core.dll'
   at mibrsdmapp.webBrowserForm.InitializeChromium()
   at mibrsdmapp.webBrowserForm..ctor()
   at mibrsdmapp.MeetingManager.btnCreate_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
mibrsdmapp
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/mibrsdmapp.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4150.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.3.23909
    CodeBase: file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/Newtonsoft.Json.DLL
----------------------------------------
RestSharp
    Assembly Version: 106.11.4.0
    Win32 Version: 106.11.4
    CodeBase: file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/RestSharp.DLL
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4075.0 built by: NET48REL1LAST
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Deployment
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
CefSharp.WinForms
    Assembly Version: 83.4.20.0
    Win32 Version: 83.4.20.0
    CodeBase: file:///C:/Users/mhdiyad.bacdounes/AppData/Local/Apps/2.0/6ZYM7JQE.BG4/0Y7EKHZ7.LBH/mibr..tion_5015be9c01ee8c6d_0001.0000_80ee611c63296f33/CefSharp.WinForms.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

解决方案

I managed to collect all the needed files mentioned Here in one folder and name it dll then I put it in the packages folder

now in .csproj and before </Project> I added

  <ItemGroup>
    <Content Include="$(SolutionDir)packages\dll\**\*.*">
      <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
      <Visible>false</Visible>
    </Content>
  </ItemGroup>

the application wored after the publish and it's solved

这篇关于发布无法加载文件或程序集CefSharp.Core.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆