From 1dae95e5ff95d258449c88f40fc1aca5a49bca88 Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Mon, 2 Oct 2023 10:53:48 +0000 Subject: [PATCH] Updated wikipage Eiffel .NETCore execution. (Signed-off-by:jocelyn). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2436 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../Eiffel-for-.NETCore-execution.wiki | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration/Eiffel-for-.NETCore-execution.wiki b/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration/Eiffel-for-.NETCore-execution.wiki index 26ccdfff..98f1b2e6 100644 --- a/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration/Eiffel-for-.NETCore-execution.wiki +++ b/documentation/23.09/solutions/dotnet/eiffel-net-language/eiffel-net-integration/Eiffel-for-.NETCore-execution.wiki @@ -1,4 +1,4 @@ -[[Property:modification_date|Mon, 02 Oct 2023 10:24:06 GMT]] +[[Property:modification_date|Mon, 02 Oct 2023 10:53:47 GMT]] [[Property:publication_date|Mon, 02 Oct 2023 10:00:56 GMT]] [[Property:uuid|1838ECEC-F411-46C7-926B-204ED0ACD0C6]] [[Property:weight|20]] @@ -24,6 +24,45 @@ This "wrapper" project is useful for: See the next sections for more information. +For an application named "app_netcore": +* the C# code is quite simple: + +... +public class wrap_app_netcore +{ + public static void Main() + { + MAIN.Main(); + } +} + +Note: the `MAIN.Main()` is the main entry point of the Eiffel .NETCore application. + +* the `wrap_app_netcore.csproj` file looks like: + + + + exe + net6.0 + enable + disable + true + true + + None + + + + + app_netcore.exe + + + Eiffelsoftware.Runtime.dll + + + + + ==Execution== It is possible that an application requires additional setting (for example web APIs application), in this case the `dotnet run` tool can use a specific '''profile''' using the syntax `--launch-profile `. @@ -51,8 +90,11 @@ In the current version, the EiffelStudio compiler will always generate a Microso For instance when using ASP.NETCore, it is expected to use `Microsoft.NET.Sdk.Web`. In such case, the generated `.csproj` file needs to be manually modified to set the expected SDK, and also the various package dependencies. +For instance, replace the first line of the `.csproj` file by and in the `` section, list the package references such as This allows the application to be run and, if necessary, debugged using VisualStudio. +<