mono

My Xamarin.Android app sometimes crashes on launch

坚强是说给别人听的谎言 提交于 2020-01-04 05:36:29
问题 Recently, my Xamarin.Android app has started to crash on launch, caused by: Java.Lang.ClassNotFoundException: mono.android.app.Application This exception is being thrown more often than not. Usually, a rebuild fixes the issue for a build or two. I tried to combat the issue by making my own application class: [Application(AllowBackup = true, Debuggable = true, Label = "My Application", Theme = "@style/AppBaseTheme", Icon = "@drawable/icon", Logo = "@drawable/icon")] [MetaData("com.google

How to use async in ASP.Net MVC for Mono

心已入冬 提交于 2020-01-04 05:27:11
问题 I am creating an ASP.Net MVC project in Mono using Visual Studio 2017 for Mac. I added the basic controllers, view, models, etc and it's working fine. However, as soon as make the Index method async I am getting the following error: System.InvalidOperationException The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/Home/Index.aspx ~/Views/Home/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index

Is “System.Speech.Recognition” namespace available in mono framework?

。_饼干妹妹 提交于 2020-01-04 05:16:09
问题 I am building one speech recognition app using classes available in .net framework. My client wants to run this application in Linux using mono framework. I tried to search whether this particular namespace and its related classes are available and working in mono framework too but couldn't find 100% correct answer. So I have two questions in my mind : Whether this System.Speech.Recognition namespace is available in mono? How to check if particular namespace/feature/class present in .net is

How to run MVC3 or newer application in Mono

久未见 提交于 2020-01-04 04:32:08
问题 Default ASP .NET MVC 3 application is created using in Microsoft Web Developer Express 2010 Application is published to file system and copied to Debian server where mono 2.10.8 , Apache and mod_mono are installed. Trying to run application causes error: Server Error in '/mvc3test' Application -------------------------------------------------------------------------------- Could not load type 'System.Web.WebPages.Razor.RazorBuildProvider' from assembly 'System.Web.WebPages.Razor, Version=1.0

Precision of C# decimal type division is different on Mono?

北慕城南 提交于 2020-01-04 04:10:13
问题 decimal d1 = 4.0m; decimal d2 = 40.0m; decimal d = d1 / d2; string repr = d.ToString(); On Windows, I get "0.1" for repr. On Mono (Xamarin Android), I get "0.1000000000000000000000000000" or so. What gives? Also, I've seen recommendations to divide by 1.0000000000000000000000000000m to get rid of unwanted trailing zeroes. That doesn't work either on Xamarin Android. Known bug? Or technically not a bug - is this allowed in conformance with the standard? To get rid of the zeroes, I'm converting

Running make get-monolite-latest, connection to storage.bos.xamarin.com never succeeds

♀尐吖头ヾ 提交于 2020-01-04 03:50:10
问题 Running make get-monolite-latest on my Centos 6.5 server seems to always give me a connection failure. I've seen this for a few days now: rm -fr /root/mono/mono/mcs/class/lib/monolite-* mkdir -p /root/mono/mono/mcs/class/lib test ! -d /root/mono/mono/mcs/class/lib/monolite || test ! -d /root/mono/mono/mcs/class/lib/monolite.old || rm -fr /root/mono/mono/mcs/class/lib/monolite.old test ! -d /root/mono/mono/mcs/class/lib/monolite || mv -f /root/mono/mono/mcs/class/lib/monolite /root/mono/mono

Mono 3.0, Ubuntu 12.10, Nginx and ServiceStack

喜欢而已 提交于 2020-01-03 18:33:20
问题 According to the ServiceStack website, it should be easy to get ServiceStack up and running on Linux with Mono. I have installed nginx, mono 3.0 and fastcgi on the system (Ubuntu 12.10). I have used this tutorial to get Nginx and fastcgi running. In MonoDevelop I have right clicked on the project, then Tools -> Deploy to web. This generates the files I want to deploy. Then I have copied the dlls to /var/www/project_folder on Ubuntu. Next I started Nginx and fastcgi. My web.config file looks

下载mono太慢怎么办?

本小妞迷上赌 提交于 2020-01-03 18:09:01
  吾这几天编译mono: 先使用git方式,无法编译。 使用下载方式,速度非常之慢,而且经常链接不上。过个几天下载完成了,万一出错,又要下载,如何是好?   怎样下载?就是早上4、5点的时候下载,非常快。因为这里美国人睡了,中国人还没上班,美国网络、中国网络都很畅通。 来源: CSDN 作者: 柳鲲鹏 链接: https://blog.csdn.net/quantum7/article/details/103821431

Deserializing JSON data in Mono

无人久伴 提交于 2020-01-03 17:44:59
问题 Is there an easy way to deserialize a simple JSON string into a .NET object when using Monodroid? System.Json only provides serialization (no deserialization) and the various third party libs I've tried were all causing problems with Mono/Monodroid. Thank you. 回答1: fastJSON suits the bill. Grab the required files (Getters.cs, JSON.cs, JsonParser.cs, JsonSerializer.cs, SafeDictionary.cs) and embed them in your project and use it. It doesn't use any fancy .NET specific class so it should work

Platform Invoke F# callback functions

╄→尐↘猪︶ㄣ 提交于 2020-01-03 17:25:44
问题 I am using F# on a Raspberry Pi 2 (ARM 7 & thus mono). I am currently trying to use the WiringPi library, written in C. I have successfully managed to use some of the functions using P/Invoke. Now I am trying to use interrupts (see http://wiringpi.com/reference/priority-interrupts-and-threads/) but I am stumped by this function with the following C signature int wiringPiISR (int pin, int edgeType, void (*function)(void)); Which has been translated (see https://github.com/danriches/WiringPi