Reputation: 1022
Hi I'm new in the visual studio 2017 and .net core 2.0 world. I have started to working on a project of a colleague that in the moment is not at work. It start correctly. Only one thing disturb me a lot:
When I start the application with Visual Studio 2017 then a console (not in VS) appear in the window and a browser opens. When I close the console or the browser the application die. The application has only back end function, so I don't need the browser. Is there some way to:
Thank you in advance
P.S: I think this is a more VS setting so I didn't wrote the code. But If you think there are more info that can help you to figure out my problem, don't hesitate to ask me. Thanks
Upvotes: 0
Views: 71
Reputation: 2577
In a asp.net core application there is a folder called properties, in that folder there is a file called launchSettings.json.
Open up the file and you will find json like this:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55556/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "api/getallobjects",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyServer": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/getallobjects",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000/"
}
}
}
You can edit this json to adjust what visual studio does when it launches.
So in your case if you want to stop the browser from starting just change the launchBrowser
property to false
.
Upvotes: 1