Eiffel .NETCore execution
This document provide a quick overview on how to execute Eiffel.NetCore applications. It covers various aspects including the wrapper project, execution, publishing, debugging in VisualStudio, and known limitations
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.
The generated executable can not be executed by itself and requires to be launched using the
dotnet tool from the command line.
To help the user, the EiffelStudio compiler also generates a C# wrapper project (located in W_code or F_code directories). See the
This simple C# wrapper project is simply a way to include and instantiate the Eiffel .NETCore code.
This "wrapper" project is useful for:
- using profile
- publishing the executable
- debugging using VisualStudio.
- Working with any specific tool that requires a C# project
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() is the main entry point of the Eiffel .NETCore application.
wrap_app_netcore.csprojfile looks like:
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
Read more about the
dotnet tool, and especially the
run command at https://learn.microsoft.com/fr-fr/dotnet/core/tools/dotnet-run .
The 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.
Debugging in VisualStudio
Even if EiffelStudio does not provide any support for debugging Eiffel .NETCore directly from the IDE.
It is possible to use, for instance, 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#
.csprojfile with VisualStudio (it includes the associated Eiffel output dll or exe)
- Configure the Debugging profile
- Launch the execution with VisualStudio, and debug.
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
In such case, the generated
.csproj file needs to be manually modified to set the expected SDK, and also the various package dependencies.
- replace the first line of the
- and in the
<ItemGroup>section, list the package references such as
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.10" />
This allows the application to be run and, if necessary, debugged using VisualStudio.