heal-research / SimSharp

Sim# is a .NET port of SimPy, process-based discrete event simulation framework
MIT License
126 stars 30 forks source link

error CS5001 with net6.0 for a sample program #42

Closed odamon63 closed 2 years ago

odamon63 commented 2 years ago

Hello, I am new to C# trying to switch from SimPy to SimSharp. I had troubles to run the "BankRenege" sample but found a solution :

abeham commented 2 years ago

The Main method is part of the file RunAllSamples.cs. This runs all of the samples one after another, you can uncomment the samples that you don't want to run. The following steps executed in the commandline suffice to run the samples:

  1. git clone https://github.com/heal-research/SimSharp.git
  2. cd SimSharp/src
  3. dotnet restore
  4. dotnet build
  5. cd Samples
  6. dotnet run

I noticed that the launch.json configuration used in Visual Studio Code was not updated when projects were retargeted to .NET 5.0 and fixed that in 27914f05aef08478d9adb372005d6c96627323b9. So you can also use VS Code launch instead of the dotnet CLI.

Your solution would introduce two Main() methods in the project.