How can I disable the IIS Express launch profile for ASP.NET Core?

前端 未结 5 1069
梦如初夏
梦如初夏 2020-12-30 00:49

I\'m writing an ASP.NET Core app (on the full .NET Framework) that uses WebListener, rather than Kestrel.¹ I\'m using Visual Studio 2015 with Update 3, and \".NET Core 1.0.1

5条回答
  •  自闭症患者
    2020-12-30 01:24

    UPDATE:

    The issue should be fixed with the latest release (update) of Visual Studio 2017.

    Initial answer:

    As mentioned in comments in ssmith answer, Visual Studio keeps restoring the settings on restart.

    Since I could not find a better solution, I just denied the write permissions on launchsettings.json for Visual Studio. I left the instructions in my other answer for similar question, here is just a copy&paste:

    1. Update your launchsettings.json for the last time.
    2. Close Visual Studio.
    3. Open security settings (right-click on launchsettings.json in Explorer -> Properties -> Security)
    4. Click Advanced -> Change Permissions
    5. Select "Authenticated Users" (or other user group under which Visual Studio is running on your machine) from the "Permissions entries" list and click Edit ->
    6. Check Deny for "Create files / write data" permission.
    7. Click OK in all open dialogs and warnings to save changes.
    8. Reopen Visual Studio and see it fail to do it's update.

    Hope it helps.

提交回复
热议问题