I'm currently trying to run my netcoreapp2.0 on Mono. It's a console app that utilizes only .NET Standard libraries.
My first and most important question is, can Mono run console netcoreapp2.0 in the first place?
From the information I gathered, the answer should be yes. I verified if mono can run basic console hello world app produced with dotnet new, and I succeeded.
If this behaviour is officially supported and I'm not trying to explore some experimental functionality, could you take a look why my app does not work under Mono?
curl -L https://github.com/JustArchi/ArchiSteamFarm/releases/download/3.1.2.9/ASF-generic.zip -o ASF.zip
unzip ASF.zip
mono ArchiSteamFarm.dll
The result:
Unhandled Exception:
System.TypeLoadException: Could not resolve type with token 0100003d from typeref (expected class 'System.Runtime.CompilerServices.TaskAwaiter`1' in assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not resolve type with token 0100003d from typeref (expected class 'System.Runtime.CompilerServices.TaskAwaiter`1' in assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
The same result for dotnet ArchiSteamFarm.dll:
2018-05-25 21:38:57|dotnet-14426|INFO|ASF|InitASF() ArchiSteamFarm-custom V3.1.2.9 (0eaf211a-d965-4a27-aa6c-6d2ca2a9c7a8)
It's possible that I'm running into some incompatibility. I tried to msbuild the project from source under Mono and succeeded without issues, but the resulting dll app was also impossible to execute.
If by any chance you'd like to take a look into source, feel free to git clone my repo and compile ArchiSteamFarm project: https://github.com/JustArchi/ArchiSteamFarm/tree/master/ArchiSteamFarm
Thank you in advance for taking a look.
Mono can run some netcore application. In your case I could run it but it still requires some manual changes on our side. netcore is prety new target for us but we should be able to run it without error once we import or implement the missing APIs.
Right now your sample fails for me with
2018-05-28 13:28:37|mono-sgen-49568|INFO|ASF|InitASF() ArchiSteamFarm-custom V3.1.2.9 (0eaf211a-d965-4a27-aa6c-6d2ca2a9c7a8)
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: System.Threading.Tasks.Task System.IO.File.WriteAllTextAsync(string,string,System.Threading.CancellationToken)
Alright, thank you for your answer. Is there any plan to make Mono fully .Net Core compatible, or is it rather low priority as of now? I'm asking since I'm not sure how many APIs mono is actually missing, and based on your output above, this shouldn't be a big amount in my case, considering you got initial welcome, but of course it might be bigger amount in other projects.
We are importing more APIs by consuming CoreFX implementation it's just that we haven't got into File type yet
Alright, that's everything I wanted to know as of now. Thank you a lot! 馃憤
Most helpful comment
We are importing more APIs by consuming CoreFX implementation it's just that we haven't got into
Filetype yet