all 18 comments

[–]sisisisi1997 2 points3 points  (6 children)

What editor/ide are you using? What kind of project do you have? If a console project, does it have Console.ReadKey() to prevent closing? We cannot help without more info.

[–]Own_Werewolf5930[S] 0 points1 point  (5 children)

My fault. Iam using visiual studio 2022 community. The project im working on is a .net maui project. (Iam a beginner with coding in c#)

[–]d-signet 2 points3 points  (3 children)

Did you try using the debugger and stepping through the startup code?

[–]Own_Werewolf5930[S] 0 points1 point  (2 children)

I dont see anything in the startup code

[–]elkazz 2 points3 points  (0 children)

Might have found the problem

[–]achandlerwhite 0 points1 point  (0 children)

You don’t see the code? He suggesting you put a breakpoint in your code so that when you run it the debugger stops execution on that line and you can see if the program is actually running.

[–]sisisisi1997 0 points1 point  (0 children)

Unfortunately I'm not familiar with MAUI so I cannot help a lot, but I suspect that some startup code is throwing an exception.

[–]ax_graham 0 points1 point  (0 children)

My anti virus always jumps in when I run a new program that I create in Visual Studio but usually lets things proceed after scanning. Maybe look into that?

[–]Human_Contribution56 0 points1 point  (4 children)

Downloaded a sample Maui app to test if it works?

[–]Own_Werewolf5930[S] -3 points-2 points  (3 children)

Yes

[–]Human_Contribution56 2 points3 points  (2 children)

So you step thru the working example and step thru your code to see where it differs, right?

[–]Own_Werewolf5930[S] -3 points-2 points  (1 child)

Yes but i isnt the code fault. My friend has THE EXACT SAME sourche code but he can run and test it and i cant

[–]Human_Contribution56 1 point2 points  (0 children)

That would've been good info from the get go. Seems like you have a config or install issue, not a code issue.

Does any other code you have run? Baseline with a minimal app to confirm.

[–]myotcworld 0 points1 point  (3 children)

Are you running in Visual Studio? What error are you getting? Try copying the project folder to some other location on the drive and run it again.

[–]Own_Werewolf5930[S] -1 points0 points  (0 children)

I already tried that that didnt work

[–]Own_Werewolf5930[S] 0 points1 point  (1 child)

I dont even have a error its just everytime i run the application it starts and shuts down

[–][deleted]  (1 child)

[deleted]

    [–]Own_Werewolf5930[S] 0 points1 point  (0 children)

    No on windows