From b037ddd9874f93ea959b8eae7bde904bd2404ca0 Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Mon, 2 Oct 2023 10:04:23 +0000 Subject: [PATCH] Updated wikipage Eiffel for .NETCore execution. (Signed-off-by:jocelyn). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2420 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../Eiffel-for-.NETCore-execution.wiki | 38 ++++++++++++++++++- 1 file changed, 37 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 b0b2d6ce..9974c722 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,6 +1,42 @@ -[[Property:modification_date|Mon, 02 Oct 2023 10:00:56 GMT]] +[[Property:modification_date|Mon, 02 Oct 2023 10:04:22 GMT]] [[Property:publication_date|Mon, 02 Oct 2023 10:00:56 GMT]] [[Property:uuid|1838ECEC-F411-46C7-926B-204ED0ACD0C6]] [[Property:weight|0]] [[Property:title|Eiffel for .NETCore execution]] [[Property:link_title|NETCore execution]] + +At the moment, the EiffelStudio '''debugger has no support''' Eiffel .NET Core. + +It is, however, possible to execute most of the Eiffel .NET Core application from the IDE using the `Run` command. The execution will be outside EiffelStudio. + +{{note|The generated executable can not be executed by itself and requires to be launched using the `dotnet` tool from the command line. Using the the syntax: `dotnet ` or `dotnet run `.}} + +{{tip|In addition, 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 `.}} + +{{info|Read more about the `dotnet` tool, and especially the `run` command at [https://learn.microsoft.com/fr-fr/dotnet/core/tools/dotnet-run] .}} + +To help the user, the EiffelStudio compiler also generates (in W_code or F_code directories) a C# wrapper project. See the `wrapper_*.cs` and `wrapper_*.csproj` files. +This "wrapper" project will be useful for specific execution, but also [[#Publishing|publishing]] the executable, or even '''debugging''' using VisualStudio. See the next sections for more information. + +==Publishing== +This '''wrapper''' project is helpful to '''publish''' the executable to the current or other platforms, and have an executable that does not require the `dotnet` command. It is also possible to include all dependencies (i.e: self contained) to ease deployment on machine without any dotnet runtime installed. + +{{note: use the `dotnet publish` tool on the generated C# wrapper project. See the documentation about `dotnet publish` at [https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish] .}} + +==Debugging in VisualStudio== +Even if EiffelStudio does not provide any support for debugging Eiffel .NETCore directly from the IDE. +It is possible to use VisualStudio to debug the generated Eiffel .NETcore application thanks to the wrapper C# project. + +A solution is to use the C# wrapper project generated by the Eiffel compiler (in W_code or F_code directory) within VisualStudio. +* Open the C# `.csproj` file with VisualStudio (it includes the associated Eiffel output dll or exe) +* Configure the Debugging profile +* Launch the execution with VisualStudio, and debug. + +==Limitations== +In the current version, the EiffelStudio compiler will always generate a Microsoft.NET.Sdk C# wrapper project. But this is not always the expected type SDKs. +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. +This allows the application to be run and, if necessary, debugged using VisualStudio. + + +