mono

WebRequest not working with ssl on Xamarin.Forms, despite servicePointManager hack

白昼怎懂夜的黑 提交于 2019-12-23 17:04:08
问题 I am writing an application that needs to read from a REST api that is only available over https. I am running into the issue where the request fails in Mono.Security, with the message: "The authentication or decryption has failed." I did my research and found that Mono by default doesn't have any trusted certificates. All the sources I found said that I could use ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback((sender, certificate, chain,

Mono.Math.BigInteger is inaccessible due to its protection level

有些话、适合烂在心里 提交于 2019-12-23 16:29:09
问题 So I'm working on a program in C# using ideone and I'm working with Mono for the first time. I'm trying to use the BigInteger class (Mono.Math.BigInteger) but I keep getting errors. Here's me code below. What is going on and how do I fix it? Thanks. using System; using Mono.Math; public class TFIB { public static int Main() { const int FIB_SEQUENCE_SIZE = 300; BigInteger[] FibonacciSequence = new BigInteger[FIB_SEQUENCE_SIZE]; // Calculate Fibonacci Sequence FibonacciSequence[0] = 0;

Is there a pipe-like .NET Stream class that doesn't use OS pipes?

牧云@^-^@ 提交于 2019-12-23 15:27:39
问题 Using C#/.NET (Xamarin/Mono, really). I have a class with a method (A) that accepts a stream that it writes to, and I have another class with a method (B) that accepts a stream to read from. I want to have a stream that is passed to both (A) and (B), such that when (A) writes to the stream, that data can be read by (B). Is there already such a beast that doesn't using OS pipes? 回答1: i would use BlockingCollection. For example BlockingCollection<int> bc = new BlockingCollection<int>(); Task

Correct way to install Mono Framework in OS X

谁说我不能喝 提交于 2019-12-23 13:13:30
问题 Is there a correct way to install a new version of Mono (for example 2.10.5) having an older version already installed (for example 2.10.4)? Which way is it possible to follow? Uninstall the older version and then install the new one Overwrite the older version with the new one Thank you in advance. 回答1: Just install and don't worry about it. Frameworks support multiple versions. You'll wind up with both versions available. If you definitely want to get rid of the old version(s), then just

.NET 4.6 - monodevelop on linux

回眸只為那壹抹淺笑 提交于 2019-12-23 12:56:34
问题 I have mono installed from beta channel (http://www.mono-project.com/docs/getting-started/install/linux/) - version 4.0.4 I can't compile Visual Studio 2015 project. In project options under Build->General the Target framework is .NETFramework 4.6 (Not installed). Compilation errors: Project settings: 回答1: You will have to downgrade to .NET 4.5 profile if you do want to target both .NET and Mono, or you help Mono out by filling the gaps between 4.5 and 4.6, or you simply wait till someone

Mono.Cecil - How to get custom attributes

蹲街弑〆低调 提交于 2019-12-23 12:42:14
问题 I am trying to use Cecil to inspect the attributes associated with a given method. It seems to find it, but I cannot get its name using the following code: AssemblyDefinition assembly = AssemblyFactory.GetAssembly(pathBin); assembly.MainModule.Types[0].Methods[1].CustomAttributes[0].ToString() I know this must be the attribute I've set my function to, because when I remove it from the dll, the second line of code will turn out to null. What I'd like to do is be able to get the attribute's

How can I use System.Windows.Forms in MonoDevelop on Ubuntu?

允我心安 提交于 2019-12-23 12:34:25
问题 I met this problem at the beginning of my work. I am using Mono 2.10 with MonoDevelop 2.8. When I create a new C# project, I can not use: using System.Windows.Forms because there is no such namespace here. I searched for some answer and tried: apt-get install libmono-system-windows-forms4.0-cil and apt-get install libmono-winforms2.0-cil but they all tell me I have installed them. So now I'm wondering if I can not write windows forms application with Mono but I can only run such application

Problems while creating a Linux-executable file from C# sourcecode using mkbundle

…衆ロ難τιáo~ 提交于 2019-12-23 12:24:25
问题 As mentioned in this thread as well as here I am using mkbundle -o newfile oldfile.exe --static (OS: Ubuntu 11.10 64bit, Mono: 2.10.5) to create a file which shall be executable on an Apache Web Server (OS: Debian GNU/Linux 32bit). Here, the oldfile.exe was the result of the compilation of a C#-Hello-World-Code using mcs oldfile.cs . On the original system (with Ubuntu) the file is executable. However, whenver I call newfile on the Apache Web Server I get the error: cannot execute binary file

Mac OS X Mono and MySql Connector Problem

一世执手 提交于 2019-12-23 12:15:25
问题 I downloaded mysql-connector-net-6.4.3-noinstall.zip, extracted and renamed mysql.data.dll to MySql.Data.dll: $ cd v2/ $ ls mysql.data.cf.dll mysql.data.dll mysql.data.entity.dll mysql.visualstudio.dll mysql.web.dll $ mv mysql.data.dll MySql.Data.dll $ sudo gacutil /i MySql.Data.dll Password: Installed MySql.Data.dll into the gac (/Library/Frameworks/Mono.framework/Versions/2.10.4/lib/mono/gac) I than create a symbolic link in /Library/Frameworks/Mono.framework/Versions/2.10.4/lib/mono/2.0 to

how to skip the strong name verification for delay signed assembilies on Mono and Visual studio 2010(C#4.0)?

谁都会走 提交于 2019-12-23 11:44:16
问题 how to skip the strong name verification for delay signed assembilies on Mono and Visual studio 2010(C#4.0)? Thanks & Regards, P.SARAVANAN 回答1: You have to pass the -Vr command-line option to the strong name tool ( sn.exe ): sn -Vr yourAssembly.dll Be careful though: this should only be done on development machines because of security considerations. Quoth the documentation: Use this option only during development. Adding an assembly to the skip verification list creates a security