简体   繁体   English

在Windows 7上以Parallels 8错误运行C#Windows窗体应用程序

[英]Running a C# Windows Forms application on Windows 7 in Parallels 8 error

I have written a pretty simple C# Windows Forms application, and a colleague wants to test it out on Windows 7 using Parallels 8 , because he only has a Mac. 我写了一个非常简单的C# Windows Forms应用程序,一位同事希望使用Parallels 8在Windows 7上测试它,因为他只有一台Mac。

The problem is, when he starts it up using the EXE file in the debug folder, he gets this error: 问题是,当他使用调试文件夹中的EXE文件启动它时,他收到此错误:

Error starting OMAPI (Unable to load DLL 'libomapi.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)) Check the required .dll files are present the correct versions: OmApiNet.dll libomapi.dll 启动OMAPI时出错(无法加载DLL'libomapi.dll':找不到指定的模块。(HRESULT异常:0x8007007E))检查所需的.dll文件是否存在正确的版本:OmApiNet.dll libomapi.dll

As you can see from the image below, the required DLL files are right there in the same folder, and if he takes this debug folder to a Windows PC it works fine, so it's definitely some sort of virtual machine or Parallels-specific problem. 从下图中可以看出,所需的DLL文件就在同一个文件夹中,如果他把这个调试文件夹带到Windows PC上就能正常工作,所以它绝对是某种虚拟机或Parallels特有的问题。

错误的屏幕截图

How can I fix this problem? 我该如何解决这个问题?

I haven't really used virtual machines enough to know what the problem could be... 我还没有真正使用虚拟机来知道问题是什么......

在它上面运行ProcMon并查看尝试查找文件的确切做法会很有趣。

This is possibly more of a network drive issue. 这可能更像是网络驱动器问题。 Have him copy that folder from the Y: drive (shared from his Mac) to the C: drive and run it again from there. 让他将该文件夹从Y:驱动器(从他的Mac共享)复制到C:驱动器并从那里再次运行它。

It looks like your trying to run the application from a network share, in which the .NET platform forbids as its a security risk. 看起来您试图从网络共享运行应用程序,其中.NET平台禁止作为安全风险。 Try copying the files to someplace else on the virtual machine such as C:\\Temp. 尝试将文件复制到虚拟机上的其他位置,例如C:\\ Temp。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM