Updated wikipage Eiffel for .NET Integration. (Signed-off-by:jocelyn).

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2421 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eiffel-org
2023-10-02 10:04:28 +00:00
parent b037ddd987
commit 8c7b154bed

View File

@@ -1,4 +1,4 @@
[[Property:modification_date|Mon, 02 Oct 2023 09:59:58 GMT]] [[Property:modification_date|Mon, 02 Oct 2023 10:04:27 GMT]]
[[Property:publication_date|Wed, 27 Sep 2023 19:33:07 GMT]] [[Property:publication_date|Wed, 27 Sep 2023 19:33:07 GMT]]
[[Property:title|Eiffel for .NET Integration]] [[Property:title|Eiffel for .NET Integration]]
[[Property:weight|3]] [[Property:weight|3]]
@@ -133,39 +133,5 @@ Eiffel currently does not support the special `init` property that is only initi
====Workaround==== ====Workaround====
A potential workaround is to create a C# library that uses a Factory pattern to build the required instance. A potential workaround is to create a C# library that uses a Factory pattern to build the required instance.
===Executing Eiffel .NET Core applications === ===Execution and publishing ===
At the moment, the EiffelStudio '''debugger has no support''' Eiffel .NET Core. To learn more about how to publish, execute, debug, ... the Eiffel .NETCore application, read the [[Eiffel for .NETCore execution]] page.
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 <app_name>` or `dotnet run <app_name>`.}}
{{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 <NAME>`.}}
{{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.