DEV Community

Cover image for dotnet quit unexpectedly
Chisom Nwike
Chisom Nwike

Posted on

dotnet quit unexpectedly

Hi guys,

It's the first work week for some of us in the year and you probably just decided to enjoy the comfort of the your updated Visual Studio for mac. You have written a long and pleasurable art and it's time to see it running so you can satisfy and reward your mind's effort at this new art but some how, this image above shows up and you want to go BONKERS!!!😭😩🤬

Just take a deep breath, calm down. You will be fine because I got your back. 😘💕

I believe, VS for Mac is still a work -in- progress but not so much of an excuse for the team that code / service related issues cannot be reported in the IDE's Application Output.

Here is what you might have to do to get your issue resolved.

  1. In your IDE, right click on the project and select "Reveal in Finder".
  2. Open your Terminal and cd to the Project's Location (the folder containing .csproj file).
  3. Type in the command :- dotnet run

This will give you a detailed error message and stack trace to help you figure out what the issue might be with your app at startup-time. Fix this and you will be just fine again.

Some Frequent Reasons for this will be:

  1. The Port for your app is already in use :- kindly check that port 5000, 5001 or any port configured for your app is not currently being used by another application.
  2. Service Dependencies :- Also check that you have properly configured all your app's dependencies in your startup class or autofac container (whichever one you use).

There might be other issues with your code, please share your own experience and help the community.

Have a Lovely day at work!😍👌🏾

Top comments (0)