我很困惑我的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();
}
}
}
Run Code Online (Sandbox Code Playgroud)
在Mac OSX上运行Xamarin的相同代码确实说它在Mono下运行.
回到Windows,在我的项目设置 - >构建 - >常规 - >目标框架设置为"Mono/.NET 4.0".我不明白,这是否意味着它将使用Mono或.NET 4.0?
我想强迫它使用Mono框架!
我尝试将Visual Studio 2012 csproj文件导入Monodevelop.一切正常,直到我编译.当我编译项目时,它为第一个表单生成1*.resources文件,但对于以下表单,没有生成*.resources文件,编译失败,
读取资源文件时出错... - 系统无法找到该文件(CS1566)
(抱歉 - 我不得不翻译德语)
我该如何解决这个问题?
此致,托比亚斯