强制Xamarin在Windows上使用Mono
发布时间:2020-08-06 02:16:41 所属栏目: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“ (编辑:鄂州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- Windows Python解释器在Ctrl C上退出
- 如何在Windows上确定是否安装了C/C++编译器
- .net – Windows Azure Web角色缓存(预览)“挂起
- Windows Community Toolkit 3.0 新功能 在WinFor
- windows – 如何为Git-Bash设置16种终端颜色?
- windows – 在gui中包装rsync进度的最佳方法?
- Win10远程桌面 出现 身份验证错误,要求的函数不
- 本地windows上安装protobuf和thrit环境
- 强制Windows批次脚本返回代码0
- .net – System.Diagnostics.EventLog – 连接到
热点阅读