1. Bernhard Giesriegl
  2. SnapDevelop
  3. Wednesday, 22 February 2023 11:48 AM UTC

Hi all,

when I follow with SnapDevelop 2022 1892 the tutorial 'CRUD Operations with Generic .NET DataStore' I am told to put changes into the startup.cs file.

But the created WebAPI project is not containing a startup.cs file, just a program.cs file.

 

How do I have to modify the file correct that my solution will work?

TIA

Bernhard

Accepted Answer
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 22 February 2023 14:16 PM UTC
  2. SnapDevelop
  3. # Permalink

Hi Bernhard,

.NET 6 projects allow creating executable projects without an explicit Main entrypoint. This is what was created for you. I believe the tutorials were made with the explicitly-declared-Main-class project in mind.

As a workaround for now, you can create a .NET Core 3.1 project. This will create an "old-style" project. Then you can change its runtime back to .NET 6 through the project's properties.

Hope this helps.

Regards,
Francisco

Comment
  1. Bernhard Giesriegl
  2. Wednesday, 22 February 2023 14:52 PM UTC
Many thanks,



that helped.

Regards Bernhard
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.