Page 1 of 1
.NET Core
Posted: Thu Aug 06, 2020 4:34 pm
by wriedmann
Hi Robert,
maybe my question may a bit stupid: if I would try to start with X# and .NET Core without changing to Visual Studio: is that possible?
What is a .NET Core application? A normal X# compiled application that is not using the .NET Framework, but the .NET Core libraries?
If I understand that correctly, it is enough to include the .NET Core standard library and something is downloading the right/neded libraries at runtime. What implements this mechanism? MS Build? Something built into the compiler or something in the standard runtime library?
Excuse my strange questions - I'm trying to understand the mechanism but don't know where to start.
Thank you very much!
Wolfgang
.NET Core
Posted: Thu Aug 06, 2020 5:44 pm
by robert
Wolfgang,
You know there are no stupid questions.
In fact it took me a while as well before I sort of started to understand how this works. And I must say that it is not trivial.
It is not just about where to locate the right assemblies.
My tests with .Net core / .Net 5 were using dotnet.exe (the Dotnet Command Line Interface (CLI) but this works with MsBuild as well.
The build system not only creates the right assemblies, but it also creates a set of json files that describe the version of the .Net Core/ .Net 5 SDK that is used and the location of nuget packages. And there is a mechanism that copies the current versions of these DLLs to the output folder, and when publishing it can create a single file containing all the runtime assemblies.
I am afraid this is too complicated to explain all the details in a forum message without thorough preparation.
Would it be a good idea to schedule an online demo about this in which I can describe how this is done with dotnet cli / MsBuild and demo the input and output using dotnet CLI and MsBuild.
Then maybe you or Chris can find a way to get this to work with XIDE as well.
I need some time to prepare, so I need a few days. What do you think of next Tuesday or Wednesday ?
Robert
.NET Core
Posted: Fri Aug 07, 2020 4:08 am
by wriedmann
Hi Robert,
thank you very much!
An online session would be a great idea, and I'm pretty sure there is many other people that is intererest how things work behind the scenes.
I'm going to holiday for a week today (given the situation we prefer to remain in Italy), but I already have the consent by Barbara that I can partecipate to this session even when we are away from home/office. Thursday would be a good day, and in the tradition of the online sessions you helt until now.
Again, thank you very much!
Wolfgang
.NET Core
Posted: Fri Aug 07, 2020 10:38 am
by Chris
Guys,
I will be looking forward to viewing this as well! I admit I have not looked closely into .Net Core yet, so this will be a good introduction. But I am pretty sure nothing related to nuget or external tools or anything similar will be necessary for XIDE, adding simple regular reference to the appropriate dlls will do. Well, unless Robert proves me wrong!
.NET Core
Posted: Fri Aug 07, 2020 11:20 am
by robert
Chris,
I think you need to do a bit more. Especially if you want to support including the runtime in the output folder or if you want to support bundling the runtime and the app in a single exe.
But I am sure you will be able to handle that.
Robert