c#应用程序不会在除开发它的盒子之外的任何机器上运行

标签 c# visual-studio-2010 google-maps development-environment

我是开发新手。我按照 http://code.google.com/apis/maps/articles/flashmapinwpf.html 的逐步说明进行操作使用 C# 在 wpf 应用程序中托管 google map 。 该程序将在 IDE 和我的 Windows 环境中编译并运行。相同的可执行文件不会在我测试过的任何其他机器上运行。 程序是使用 Visual Studio 2010 在 Windows 7 x64 上编译的。我编译为 x86。 我尝试使用 .NET 3.5 和 .NET 4 进行编译。 我尝试在主机上使用 .NET 3.5、3.5.1 和 4。 我已经包含了所需的库文件。 我尝试在 windows 7 x64、windows xp in virtual box 和 windows 7 x64 in virtual box 上运行可执行文件。

有趣的是,我的一个 friend 让我开始了这个项目。我看着他经历了编译程序的相同过程。然后他向我发送了项目文件,我遇到了一个我无法解决的奇怪异常。在我编译了示例程序文件后,我将完成的 .exe 发送给了他,他能够运行它。看来编译了该程序的机器能够运行它。

为什么会发生这种情况?

Windows 7 向我提供了以下错误详细信息:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: GoogleMapsFlashInWpf.exe
  Application Version:  1.0.0.0
  Application Timestamp:    4c1d70c3
  Fault Module Name:    Flash.ocx
  Fault Module Version: 7.0.19.0
  Fault Module Timestamp:   3fd4f4d4
  Exception Code:   c0000005
  Exception Offset: 00051acc
  OS Version:   6.1.7600.2.0.0.256.1
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

卸载并重新安装 adobe flash 后,我现在从 Windows 收到此错误:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid) at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e) at System.Windows.Forms.Control.OnParentVisibleChanged(EventArgs e) at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e) at System.Windows.Forms.ScrollableControl.OnVisibleChanged(EventArgs e) at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.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: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- GoogleMapsFlashInWpf Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/paul/Desktop/New%20folder/GoogleMapsFlashInWpf.exe ---------------------------------------- PresentationFramework Assembly Version: 3.0.0.0 Win32 Version: 3.0.6920.4902 built by: NetFXw7 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__31bf3856ad364e35/PresentationFramework.dll ---------------------------------------- WindowsBase Assembly Version: 3.0.0.0 Win32 Version: 3.0.6920.4902 built by: NetFXw7 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll ---------------------------------------- System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- PresentationCore Assembly Version: 3.0.0.0 Win32 Version: 3.0.6920.4902 built by: NetFXw7 CodeBase: file:///C:/Windows/assembly/GAC_32/PresentationCore/3.0.0.0__31bf3856ad364e35/PresentationCore.dll ---------------------------------------- AxInterop.ShockwaveFlashObjects Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/paul/Desktop/New%20folder/AxInterop.ShockwaveFlashObjects.DLL ---------------------------------------- System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- WindowsFormsIntegration Assembly Version: 3.0.0.0 Win32 Version: 3.0.6920.4902 built by: NetFXw7 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsFormsIntegration/3.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll ---------------------------------------- PresentationFramework.Aero Assembly Version: 3.0.0.0 Win32 Version: 3.0.6920.4902 built by: NetFXw7 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework.Aero/3.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll ---------------------------------------- System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

**************** JIT 调试 ************** 要启用即时 (JIT) 调试,.config 文件 此应用程序或计算机 (machine.config) 必须具有 jitDebugging 中设置的值 system.windows.forms 部分。这 应用程序还必须编译 调试已启用。 。例如: 当 JIT 调试时 启用后,任何未处理的异常都会 发送到已注册的 JIT 调试器 在计算机上而不是被处理 通过此对话框。

最佳答案

Fault Module Name:    Flash.ocx
Fault Module Version: 7.0.19.0

我怀疑您的部分问题可能就在那里——这个版本的 Flash 大约七年前发布了!

关于c#应用程序不会在除开发它的盒子之外的任何机器上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3077985/

相关文章:

c# - 使用 jQuery .load() 加载用户控件

sql - VB |将 SQL 查询加载到 Combobox

c++ - 使用VS2010在Windows Server 2008平台远程调试C++;缺少 MSVCP100D.dll

javascript - Google Maps API 设置图标大小

c# - MVC onfocusout 事件未触发

c# - 在 MonoTouch .NET 线程中使用 NSTimer 的问题

c# - Microsoft Bot 使用 FormFlow 从用户接收附件

.net - 如何使 Mysql .Net 连接器 6.3.3Beta 在 VS Web Express 2010 中工作?

performance - 我可以减少 Google Maps JavaScript API v3 中的请求量吗?

android - 如何为 google map api v2 设置默认位置和缩放级别?