VB.net发布表单

时间:2010-09-23 18:18:38

标签: vb.net

我知道如何发布简单的表单或在vb.net中制作的简单的Web浏览器。我制作了一个gecko基础网络浏览器,然后我发布了这个,当我执行文件时出现了一些错误

这是错误:

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

************** Exception Text **************
System.DllNotFoundException: Unable to load DLL 'xpcom': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at Skybound.Gecko.Xpcom.NS_InitXPCOM2(IntPtr& serviceManager, Object binDirectory, nsIDirectoryServiceProvider appFileLocationProvider)
   at Skybound.Gecko.Xpcom.Initialize(String binDirectory)
   at Skybound.Gecko.Xpcom.Initialize()
   at Skybound.Gecko.GeckoWebBrowser.OnHandleCreated(EventArgs e)
   at System.Windows.Forms.Control.WmCreate(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Skybound.Gecko.GeckoWebBrowser.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.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Registrar System
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Apps/2.0/JBP6A35Q.8PZ/ZRE7WGQ1.O1O/regi..tion_52bfd852927888ac_0001.0000_afb460d07594d782/Registrar%20System.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    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.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Skybound.Gecko
    Assembly Version: 1.9.1.0
    Win32 Version: 1.9.1.0
    CodeBase: file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Apps/2.0/JBP6A35Q.8PZ/ZRE7WGQ1.O1O/regi..tion_52bfd852927888ac_0001.0000_afb460d07594d782/Skybound.Gecko.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:


    


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.

这有什么问题?请帮我把我的文件变为可执行文件。

由于

1 个答案:

答案 0 :(得分:2)

  

System.DllNotFoundException:无法加载DLL'xpcom'

您的程序依赖于非托管DLL,即实现浏览器的DLL。 Visual Studio无法自动找到这些依赖项。 Xpcom.dll确实是Firefox中使用的组件之一。可能还有一些额外的。

您需要查找正在使用的gecko库的部署说明。要发布这些DLL,请使用Project + Add Existing Item并导航到DLL。该项的Build Action属性应设置为“Content”,默认为。