I am trying to remove the IIS Express profile from my .NET Core launch settings but every time i repoen the solution, Visual Studio adds it back in again. For example, in a new project my launch settings looks like this
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55735/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyProject": {
"commandName": "Project",
"launchUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
I remove the IIS sections
{
"profiles": {
"MyProject": {
"commandName": "Project",
"launchUrl": "http://localhost:5010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
The solution runs fine. But as soon as I close and reopen the solution the IIS sections reappear.
Any ideas?
UPDATE:
The issue should be fixed with the latest release (update) of Visual Studio 2017 (version 15.3.0).
Initial answer:
This is not a solution, but an ugly workaround. I figured that if I would just deny permissions to change the launchsettings.json
file this will prevent Visual Studio from overwriting it every time. Since this file doesn't change much, it is more or less a satisfying solution for me.
So:
launchsettings.json
for the last time.Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With