PR# 19932 Can't create .NET application

Problem Report Summary
Submitter: brotherbill@duck.com
Category: EiffelStudio
Priority: Medium
Date: 2024/07/01
Class: Bug
Severity: Non-critical
Number: 19932
Release: 24.05
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Can't create .NET application

Description
Unable to create a simple .NET application.

As stated before, would like to know the precise steps to create a .NET application, whether for ASP.NET Web API or WPF or even .NET Console.
To Reproduce
1. Launch Eiffel Studio 24.05
2. Create project: Microsoft .NET application
3. Click next for "New .NET Application Wizard".
    Project name: my_dotnet_application_3
    Project location: C:\dev\Eiffel .NET\WebApiNet
4. Chose (o) Executable, not Console Application
    [x] Use most recent CLR Version:   v4.030319
5. Click Finish
6. F7 to compile
7. F5 to run
    EiffelStudio Warning: "An error occurred during initialization of hte ICorDebug Debugger or during the Process creation (.NET)."
Problem Report Interactions
From:brotherbill@duck.com    Date:2024/07/05    Status: Open    Download   
You wrote:
Please copy the file libEiffelSoftware.Library.Base.dll  under the bin\Debug\net8.0 subfolder  (in W_code)
Or, avoid using precompile library for now on calculator.ecf

File libEiffelSoftware.Library.Base.dll does not exist in bin\Debug\net8.0 subfolder (in W_code).
The closest file that does exist is EiffelSoftware.Library.Base.dll or libcalculator.dll

ACTION TAKEN
==============
Remove from counter.ecf: <precompile name="precompile" location="$ISE_PRECOMP\base-safe.ecf"/>

RESULT
=======
Code runs in Visual Studio.  SUCCESS

REMAINING DEFECT 1
=================
Can't run calculator within Visual Studio

Target Selection: classic, executed within Eiffel Studio
Let's add 2 1 +, then q for quit
Help details
Enter a number, followed by <return>: 1 ENTER
Accumulator = 1
Next operation: a ENTER
Enter a number, followed by <return>: 2 ENTER
Accumulator = 2
Next operation: + ENTER
Accumulator = 3
Next operation: q ENTER
Press Return to finish the execution...  ENTER

Targ
....
Output truncated, Click download to get the full message

From:jfiat_es    Date:2024/07/05    Status: Open    Download   
To fix the EiffelStudio debugging, can you try to add %ISE_EIFFEL%\studio\spec\%ISE_PLATFORM%\bin\netcore to your PATH ?

set PATH=%ISE_EIFFEL%\studio\spec\%ISE_PLATFORM%\bin\netcore;%PATH%

From:jfiat_es    Date:2024/07/05    Status: Open    Download   
Please copy the file libEiffelSoftware.Library.Base.dll  under the bin\Debug\net8.0 subfolder  (in W_code)
Or, avoid using precompile library for now on calculator.ecf

From:brotherbill@duck.com    Date:2024/07/04    Status: Open    Download   
In Eiffel Studio 24.05, compiled with dotnet choice.
Opened W_code/wrap_calculator.csproj.
Cleaned and Rebuilt it.
Started it with debugging  wrap_calculator.cs line 17 
    MAIN.Main();
It is debugging Eiffel code in Visual Studio 2022.  Good!

Fails on make line 18, io.putstring ("%N*********************************%N")

Exception Unhandled
System.DIINotFoundException: 'Unable to load DLL 'libEiffelSoftware.Library.Base.dll'
or one of its dependencies:  The specified module could not be found. (0x8007007E)'

From:brotherbill@duck.com    Date:2024/07/04    Status: Open    Download   
Under Powershell, it displays the calculator menu, then is non-responsive except to Control-C.
 
Under Command Prompt, it runs, but it requires typing in ENTER key more than should be necessary.
At least it does run.
How can this be run inside Visual Studio 2022, so can mix and match with C# code?
This would be a good starter application.
 
Let's focus on calculator first before moving on to something more complex.
 
I would like to improve `calculator` project so that it has a nicer console feel, and to display the stack.
 
I will review the dotnet documentation.
 
Brother Bill

From:jfiat_es    Date:2024/07/04    Status: Open    Download   
Dear William,

I am puzzled, are you saying that you can not execute C# console app neither?
Or this is just about Eiffel project?

Can you try to following:
- open in console the W_code of the calculator compilation
- execute the following command:  "dotnet calculator.exe" 

What is the result ?

From:brotherbill@duck.com    Date:2024/07/01    Status: Open    Download   
With Visual Studio 2022 already installed, removed and re-installed Eiffel 24.05.
calculator still breaking when running.

From:brotherbill@duck.com    Date:2024/07/01    Status: Open    Download   
I have .NET installed.  Attached is a sample .NET 8.0 Hello World console app.

The compilation of calculator app succeeds.
When running it, it fails.

Attachment: ConsoleApp1.zip     Size:153680
From:brotherbill@duck.com    Date:2024/07/01    Status: Open    Download   
I have .NET Core 8 installed.

Attached is C# Console zip file for "Hello World" console application.

Attachment: ConsoleApp1.zip     Size:153680
From:brotherbill@duck.com    Date:2024/07/01    Status: Open    Download   
In my case, %ISE_EIFFEL%\ is:
C:\Program Files\Eiffel Software\EiffelStudio 24.05 Standard

Copied calculator directory to C:\dev\eiffel\calculator
Open calculator.ecf

Target Selection:
Choose one target among:
classic
dotnet
Selected dotnet, then clicked: "Select target" button.

Choose Your Directory
Location:  C:\dev\eiffel\calculator
[x] Compile project
Click: OK

Eiffel Compilation Succeeded
F5 to run.
EiffelStudio Warning
An error occurred during initialization of the ICorDebug Debugger or during the Process creation (.NET).

calculator.zip is downloadable from
    https://www.adrive.com/public/AdKt3j/calculator.zip
This includes the entire EIFGENs directory.

Is there anything else you need?




From:jfiat_es    Date:2024/07/01    Status: Open    Download   
Do you have .NETCore installed?
Can you try to compile  the target "dotnet" of   %ISE_EIFFEL%\examples\base\calculator\calculator.ecf 
If this is failing, can you send us the compilation output?