强制Xamarin在Windows上使用Mono
发布时间:2020-12-13 21:24:14 所属栏目:Windows 来源:网络整理
导读:我很困惑我的Xamarin项目是使用Mono框架还是MS .Net. 如果我使用此代码创建一个简单的控制台样式应用程序来检测是否在Mono中运行但是我说不是. using System;namespace ConsoleTest{ class MainClass { public static void Main(string[] args) { Type t = T
我很困惑我的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-mobile – 如何在Windows Mobile 6.0中将
- 在Windows下测量磁盘
- windows-server-2003 – 使用ASP.NET InProc会话
- 无法在Windows上安装python lxml(和libxml2)
- windows – 带GUI的免费安装系统
- Wix:升级时有时会卸载Windows服务
- windows-server-2003 – 将Windows Server 2012域
- windows-phone-8.1 – Windows Phone 8.1中按钮的
- windows – 提取lazarus资源
- Windows BAT或CMD:将一些数据发送到localhost u
热点阅读