如何在Windows中使用单声道运行时在Xamarin Studio中进行调试 [英] How to debug in Xamarin Studio using mono runtime on Windows

查看:170
本文介绍了如何在Windows中使用单声道运行时在Xamarin Studio中进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在Xamarin Studio中进行F5调试时,Windows调试开始使用Microsoft.NET。

When I try to F5-debug in Xamarin Studio on Windows debugging starts using Microsoft.NET.

任何想法如何让Xamarin使用我在机器上安装的单声道3.2.3?

Any idea how to get Xamarin to use the mono 3.2.3 which I have installed on my machine?

推荐答案

您可以在工具 - 选项 - 项目 - 中将Mono添加到.NET运行时> .NET Runtimes 。您可以浏览到您的Mono安装并添加它。

You can add Mono to the .NET Runtimes in Tools - Options - Projects - .NET Runtimes. There you can browse to your Mono installation and add it.

然后,您可以选择是否将其设置为默认值。

You then have a choice of whether to set it as the default or not.

如果您不将其设置为默认值,则当您选择运行 - 开始调试时,您不会使用Mono调试应用程序,但可以运行在解决方案窗口中右键单击项目,然后选择运行方式 - 单声道

If you do not set it as the default you will not debug your application with Mono when you select Run - Start Debugging but you can run with Mono by right clicking the project in the Solution window and selecting Run With - Mono.

如果您设置Mono作为默认运行时,那么你将使用Mono来构建和调试。但是,您将需要在构建 - 常规 - 使用MSBuild构建引擎之间的项目选项中禁用MSBuild的构建。否则将无法构建您的项目。当您调试应用程序时,Mono是默认值,它应该使用Mono。

If you set Mono to be the default runtime then you will build and debug with Mono. However you will need to disable building with MSBuild in the project options under Build - General - Use MSBuild build engine. Otherwise it will fail to build your project. With Mono being the default when you debug the application it should use Mono.

在应用程序中,您可以使用以下代码检查您是否使用Mono运行: / p>

In your application you can then use the following code to check that you are running with Mono:

        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");

这篇关于如何在Windows中使用单声道运行时在Xamarin Studio中进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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