使用MonoDevelop在Linux上为Windows编译 [英] Compile for windows on linux using MonoDevelop

查看:59
本文介绍了使用MonoDevelop在Linux上为Windows编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,因为我在google上找不到任何东西,如果我使用MonoDevelop在Linux上编译应用程序,我可以将生成的可执行文件发送到Windows计算机并希望它运行吗? file输出以下内容:

I want to know, because I can't find anything on google, If I use MonoDevelop to compile an application on Linux, can I send the generated executable to a Windows computer and expect it to run? file outputs this:

PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly

因此,我希望它可以在Windows上直接使用.但是我将其发送给朋友进行测试,并说这不是有效的win32应用程序".那么,我该怎么办?它只是C#中的一个基本的hello world控制台应用程序.

so I would expect it to run on Windows out-of-the box. But I sent it to a friend for testing, and it said 'this is not a valid win32 application'. So, what do I need to do? It is just a basic hello world console application in C#.

推荐答案

您必须在目标计算机上安装确切版本的Mono或匹配版本的.NET Framework(即,如果您针对Mono 2.10.x进行编译,您很可能需要.NET 4.0).否则,您将收到确切的错误消息.

You have to have the exact version of Mono installed on the target machine or a matching version of .NET Framework (i.e. if you compiled against Mono 2.10.x, you'll most probably need .NET 4.0). Otherwise you'll get that exact error message.

这篇关于使用MonoDevelop在Linux上为Windows编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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