mono

How to use assembly registered in GAC on MonoDevelop?

為{幸葍}努か 提交于 2019-12-24 17:28:39
问题 I recently registered Mysql.Data.dll assembly in GAC on 64bit Ubuntu 14.4 to use it following this example with an ASP.NET Mono project and verified. I realized that although it is registered in GAC, it's not directly usable from Edit references dialogue on Monodevelop. I tried to see how can this be made possible, the possibilities exists for Visual Studio which is something I don't need. Doubts: If the assembly is un-usable what is the concept of registering it in GAC? How can this assembly

Mono C# Set CultureInfo not working on Windows

微笑、不失礼 提交于 2019-12-24 14:15:01
问题 I'm currently facing a bug, that the language of my application can not be set to something different than system default. I use the following Code to set the CultureInfo: Catalog.Init("AudioCuesheetEditor", Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + MainClass.CONST_STR_LOCALE_PATH)); [...] //Set the locale log.debug("CultureInfo.CurrentCulture = " + CultureInfo.CurrentCulture); if (Program.getInstance().getObjOption().getStrSelectedLanguage() != null)

Mono, Regex and stack size

眉间皱痕 提交于 2019-12-24 14:03:01
问题 I'm porting a piece of C# software that uses System.Text.RegularExpressions.Regex for parsing out C/C++ includes out of source files. They are fully loaded into memory as a string and then just treated with the regex. It works perfectly on Windows, but Mono running on Linux fails when trying to parse larger files with a stack overflow exception thrown from deep inside System.Text.RegularExpressions.Interpreter . The code is perfectly correct - it works on Windows. Is there a way to increase

Could not load type from assembly exception in mono

a 夏天 提交于 2019-12-24 12:46:31
问题 I am new to c# and mono. and I encountered a strange question. I have 2 projects in my solution. and one is dependent on another one called CoreLogic. I've already set up the dependency and the compilation is successful. However, when I run it and sent it a request, the program throws an exception like: server Error: Could not load type 'Logic.RedisStorage' from assembly 'CoreLogic, Version=1.0.5750.32870, Culture=neutral, PublicKeyToken=null'. the strangest thing is that I can see the Logic

Type or namespace 'Mono' could not be found

蓝咒 提交于 2019-12-24 12:19:02
问题 I am trying to simply compile code from here https://github.com/neoeinstein/purpleonion I have installed mono, monodevelop, .net framework 4 and gtk# When I open the solution and try to compile any of the projects, I get this error, namespace 'Mono' could not be found. How can it not be found? Isn't that the base namespace that must exist in mono? 回答1: The Mono implementation of the BCL assemblies does not expose any additional API. If something's referring to a Mono namespace, it comes from

Compiling C# via Unity3D and MonoDevelop

情到浓时终转凉″ 提交于 2019-12-24 11:36:08
问题 I'm using Unity3D v4.2.2f1, and the version of MonoDevelop it comes bundled with - v2.8.2. I see that there are cases where C# code will compile in Unity3D, but not in MonoDevelop. For instance, default values for method arguments are accepted by Unity3D, but result in "Default parameter settings are not permitted (CS0241)" in MonoDevelop. General advice I've found online is to not attempt to compile from MonoDevelop. Fine - but I'm keen to understand how this mismatch arises. I thought that

Compiling System.Tuple in Mono

二次信任 提交于 2019-12-24 11:29:32
问题 I'm attempting to compile some C# with gmcs version 2.11.0 that includes System.Tuple. Supposedly it does exist in Mono (http://stackoverflow.com/questions/5346453/mono-is-there-a-system-tuple) and it is possible to compile using the flag: gmcs -langversion:future It doesn't seem to matter which langversion I use, the compiler always gives the same error: error CS0234: The type or namespace name `Tuple' does not exist in the namespace `System'. Are you missing an assembly reference? How can I

How do I add my mono Program to the startup?

為{幸葍}努か 提交于 2019-12-24 11:13:03
问题 I am very new to Ubuntu. I've a mono application deployed on EC2. Currently I use mono folder/app.exe to start the program. How can I make this run when the system reboots? Thanks in advance. UPDATE:- In addition to the below answer, I've moved the folder to /opt . Otherwise it was throwing library not found error. 回答1: I'd suggest using upstart. Example: /etc/init/app.exe.conf description "My Mono app" start on runlevel [2345] stop on runlevel [016] setuid nobody setgid nogroup respawn

Scripts installed by the deb package have wrong prefix

匆匆过客 提交于 2019-12-24 10:48:30
问题 Building our own deb packages we've run into the issue of having to patch manually some scripts so they get the proper prefix. In particular, We're building mono We're using official tarballs. The scripts that end up with wrong prefix are: mcs, xbuild, nunit-console4, etc An example of a wrong script: #!/bin/sh exec /root/7digital-mono/mono/bin/mono \ --debug $MONO_OPTIONS \ /root/7digital-mono/mono/lib/mono/2.0/nunit-console.exe "$@" What should be the correct end result: #!/bin/sh exec /usr

Problem with .net app under linux, doesn't work from shell script

喜夏-厌秋 提交于 2019-12-24 09:27:06
问题 I'm working on a .net post-commit hook to feed data into OnTime via their Soap SDK. My hook works on Windows fine, but on our production RHEL4 subversion server, it won't work when called from a shell script. #!/bin/sh /usr/bin/mono $1/hooks/post-commit.exe "$@" When I execute it with parameters from the command line, it works properly. When executed via the shell script, I get the following error: (looks like there is some problem with the process execution of SVN that I use to get the log