Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 07 2019 17:29
    @directhex banned @CharlieIsHere
  • Oct 11 2018 17:23
    @directhex banned @deleteaccount1234567890
Ultimate
@KosmicTask

I embed a cut down copy of Mono into our app, the Windows version of which targets 4.7.2. I am upgrading to Mono 6.12.0. Previoulsy I had always loaded mscorlib from lib/mono/4.5 and all was good.

So I thought it might be better to load from lib/mono/4.7.2-apibut the mscorlib there is invalid - maybe its just a reference assembly. Also Mono seems to insist on trying to load from the 4.5 path and fails if it is not present.

So I am a bit confused as to what the purpose of the lib/mono/4.x.x-api folders is. I need to load netstandard.dll from the Facades folder and presumed I needed to load it from the 4.7.2-api path but I am beginning to think that I should stick with the 4.5 path.

I just want to ensure that I have compatability with 4.7.2.

Alexander Köplinger
@akoeplinger
yes anything in -api folders are reference assemblies
they are only used for compilation, never at runtime
the 4.5 folder and Facades subfolder is the correct one to load from in your case as it contains the "latest" binaries (we couldn't rename the folder for various reasons)
Ultimate
@KosmicTask

@akoeplinger On macOS and Azure dll that I think is targeting netstandard 2 has a dependency on system.Runtime.InteropServices.RuntimeInformation.dll. The RuntimeInformation class was added in 4.7.1 as part of mscorlib.

I presume the dll is added as a dependency to support targets earlier than that. Mono wants to load this dll and if I manually copy it into the app folder the app runs ok. But from reading what you said here https://github.com/dotnet/runtime/issues/17471#issuecomment-272431695 it looks as if that dll maybe Windows specific.

It maybe that the windows specific code in that dll won’t be called, or maybe it will under some conditions. Will Mono try and resolve the RuntimeInformation type from its own mscorlib implementation or will it use the dll definition?

Looking at the nuget package info for the dll I can see this

"runtimeTargets": {
          "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": {
            "assetType": "runtime",
            "rid": "unix"
          },
          "runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll": {
            "assetType": "runtime",
            "rid": "win"
          }
        }

But as that is netstandard1.1 I don’t know if it wouyld be worth trying to install it instead.

Alexander Köplinger
@akoeplinger
if the library targets netstandard2.0 then it won't need System.Runtime.InteropServices.RuntimeInformation.dll since all of these APIs are in netstandard.dll
so presumably your reference comes from somewhere else
we added code to check for the MVID (unique GUID for each assembly) to try and skip loading known-problematic assemblies like the windows-only version of s.r.i.runtimeinformation.dll
Paulo Aboim Pinto
@aboimpinto
@bopin maybe you can keep your git project updated for people to check it .
sorry ... wrong channel
Timothy
@timothyparez
HI I am trying to build mono for godot (https://github.com/godotengine/godot-mono-builds) and running into the following error:
No rule to make target '../../external/corefx/src/Native/Unix/System.Native/pal_errno.c', needed by '../../external/corefx/src/Native/Unix/System.Native/libmono_native_la-pal_errno.lo'.  Stop.
Does anybody know how to fix this?
Alexander Köplinger
@akoeplinger
sounds like you didn't initialize the git submodules
try running scripts/update_submodules.sh in the Mono repo root
Timothy
@timothyparez
@akoeplinger will try thnx
Git submodules updated successfully Error: Couldn't find the required submodules. This usually happens when using an archive from GitHub instead of https://download.mono-project.com/sources/mono/, or something went wrong while updating submodules.
I cloned from github and then checked out mono-6.12.0.111 124f1157141
Timothy
@timothyparez
Because 6.12.0.111 is not available from https://download.mono-project.com/sources/mono/
Alexander Köplinger
@akoeplinger
hm if you used git clone and then git checkout to checkout that tag it should've worked
Timothy
@timothyparez
git checkout tags/mono-6.12.0.111 -b mono-6.12.0.111 is what I used
Perhaps something wrong with that one ?
Alexander Köplinger
@akoeplinger
hm it should work. does the file exist in external/corefx/...?
Timothy
@timothyparez
@akoeplinger that directory is empty ....
Alexander Köplinger
@akoeplinger
then something went wrong with updating the submodules
I'd probably delete the directory and clone a fresh one with the --recurse-submodules option
Timothy
@timothyparez
ok will try
Timothy
@timothyparez
will take a day or two though
Romber
@Rombersoft
Hello everybody. I face to such problem on gtk-sharp project. My Arch Linux OS has "ru-Ru" default localization or culture. I want to use Ukrainian words on application but MessageBox on gtk-sharp writes text on button using default Russian. How can I set new localization or culture "uk-UA" or how can I directly write text on MessageBox button?
Timothy
@timothyparez
@akoeplinger the clone completed today (took about 12 hours :P) and now it works, thank you!
Robert Campbell
@jayrulez
How is the mono here https://github.com/dotnet/runtime/tree/master/src/mono different from mono/mono ?
If I'm looking to embed mono in a C++ app then which one should I be looking at?
Ultimate
@KosmicTask
@jayrulez The first one is the Mono runtime as shipped as part of dotNet core / 5 which is used AFAIK in Blazor. The second is the legacy implementation of Mono which you can think of as implementing dotNet framework. You certainly can embedd the legacy Mono in your cpp app. You may be able to embed the newer runtime too but I am not sure of the detail as yet.
Robert Campbell
@jayrulez
Thanks @KosmicTask . I've gotten a detailed discussion in the discord.
Zou Wei
@zwcloud
Hi. Is there any documentation on mono-wasm's BINDING APIs?
image.png
For example, how to use BINDING.call_static_method.
Zou Wei
@zwcloud
@atsushieno
Serentty
@Serentty
What are the odds that the other Mono that legacy Mono supports will be ready in time for .NET 6?
Serentty
@Serentty
Oops, I mean the other platforms that legacy Mono supports.
Simona Avornicesei
@savornicesei
What is the correct way to build a solution file (classic .NET Framework 4.x project) with mono, on linux (openSUSE Tumbleweed)? I'm doing mono /usr/lib/mono/msbuild/15.0/bin/MSBuild.dll Solution.sln but it complains about error MSB4019: The imported project "/usr/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.CSharp.Core.targets" was not found. Passing RoslynTargetsPath=/usr/lib/mono/msbuild/Current/bin/Roslyn raises /usr/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.Managed.Core.targets(60,27): error MSB4184: The expression ""../CommonAssemblyInfo.cs".GetPathsOfAllDirectoriesAbove()" cannot be evaluated. Method 'System.String.GetPathsOfAllDirectoriesAbove' not found I feel like I'm running in circles...
amieres
@amieres
Question: in mono wasm in aot-interp mode, is there a way to force a method in a DLL (third party dll) to be evaluated in interpreted mode instead of AOT? The code works well in interpreted mode but it is slow. But this function uses reflection and fails with null exception. Could it be forced to be interpreted?
Panos Athanasiou
@panoukos41
Hey, I know it's silly but is it possible to run a .netcore app using mono? Or just a simple .netstandard2.1 like it was a console app?
Alexander Köplinger
@akoeplinger
no, it's not possible
Romber
@Rombersoft
Hello Great People. I have modem Huawei E372. I need to write/read to port /dev/ttyUSB2 but I can only write, when I do reading that SerialPort.BytesToRead returns 0 always. On port /dev/ttyUSB0 I have not any problem to reading and writing. And when I use cutecom application to /dev/ttyUSB2 that also it has not any problem.
This is not first modem in my experience, I noticed the same problem on some modems with Qualcom processors. I've tried with RtsEnable and DtrEnable and without, different HandShake, NewLine and unsuccessfully. I can not understand what do cutecom application that does not do mono. Maybe anybody help me describe my problem
johnson3d
@johnson3d
Hello,Can i debug C# in a c++ app that embed mono runtime. Mono debug doesn't work in vscode
JohnKaldas
@JohnKaldas

Hi guys, I was working on cross-compiling mono
I got the following error when I run make:

libtool: compile: arm-linux-gnueabi-gcc -DHAVE_CONFIG_H -I./include -I./include -DGC_PTHREAD_START_STANDALONE -fexceptions -Wall -Wextra -Wpedantic -Wno-long-long -g -O2 -fno-strict-aliasing -MT extra/gc.lo -MD -MP -MF extra/.deps/gc.Tpo -c extra/gc.c -fPIC -DPIC -o extra/.libs/gc.o
In file included from ./include/private/gc_priv.h:254:0,
from ./include/private/dbg_mlc.h:28,
from extra/../backgraph.c:15,
from extra/gc.c:39:
./include/private/gc_atomic_ops.h:105:25: fatal error: atomic_ops.h: No such file or directory
compilation terminated.
Makefile:1599: recipe for target 'extra/gc.lo' failed

JohnKaldas
@JohnKaldas

Hi guys, after I managed to build mono, I got another issue while running mono

The assembly mscorlib.dll was not found or could not be loaded.

not sure why this dll file is not generated after the build of mono
hn2
@hn2
Hello
Can someone help with this error?