MicrosoftLearning / mslearn-openai

https://microsoftlearning.github.io/mslearn-openai/
MIT License
214 stars 325 forks source link

Missing Code Structure #71

Closed gerryaobrien closed 4 months ago

gerryaobrien commented 4 months ago

Module: 02

Lab/Demo: 02-azure-open-ai

Task: 00

Step: 00

Description of issue There is no namespace or main() method in the CSharp Program.cs file.

Repro steps:

1. 1. 1.

ivorb commented 4 months ago

In the new format of C# code, explicit definition of main() isn't necessary provided there is only one entry point - which is the case here. Try running the code in .NET 7 on the provided VM and you'll see the code runs fine as written. Here's the docs page on top level statements for more info on that structure

gerryaobrien commented 4 months ago

Apologies, I should have tried it on another PC to verify. The first one I used has some framework issues and would not load the program. Tried it on another and the code works as written.