强制Xamarin在Windows上使用Mono
发布时间:2020-08-06 02:27:51 所属栏目:Windows 来源:互联网
导读:我很困惑我的Xamarin项目是使用Mono框架还是MS .Net. 如果我使用此代码创建一个简单的控制台样式应用程序来检测是否在Mono中运行但是我说不是. using System;namespace ConsoleTest{ class MainClass { public static void Main(string[] args)
|
我很困惑我的Xamarin项目是使用Mono框架还是MS .Net. 如果我使用此代码创建一个简单的控制台样式应用程序来检测是否在Mono中运行但是我说不是. using System;
namespace ConsoleTest
{
class MainClass
{
public static void Main(string[] args)
{
Type t = Type.GetType("Mono.Runtime");
if (t != null)
Console.WriteLine("You are running with the Mono VM");
else
Console.WriteLine("You are running something else");
Console.ReadLine();
}
}
}
在Mac OSX上运行Xamarin的相同代码确实说它在Mono下运行. 回到Windows,在我的项目设置下 – >构建 – >一般 – > Target Framework设置为“Mono / .NET 4.0”.我不明白,这是否意味着它将使用Mono或.NET 4.0? 我想强迫它使用Mono框架! 在Windows上默认情况下,XS使用.NET运行时,但如果已安装mono框架,则可以将默认运行时间设置为“Mono”,然后再次检查代码的输出.您可以从此处将默认运行时间设置为单声道:在Windows => Xamarin Studio =>工具=>选项=>项目和.NETRuntimes“ (编辑:日照站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- JLink重刷固件(win7/win8/win10亲测可用)
- win7运行mapreduce报错Could not locate executable nullbi
- Windows – 使用PowerShell进行Visual Studio命令提示符
- .net – 在Windows服务中使用计时器
- Windows Python解释器在Ctrl C上退出
- windows-phone-7 – windows phone芒果 – 点击和点击之间的
- windows-7 – WMI安全中心产品状态说明
- 获取Windows代理用户名/密码
- Windows 8应用程序是否运行符合标准的JavaScript,HTML5和CS
- Windows10下docker的启动
