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

前端 未结 5 1073
梦如初夏
梦如初夏 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:46

    So we've been struggling with this as well. What we ended up doing was having a copy of the launchsettings.json which was "clean", without the IIS Express stuff in it, and then having a pre build script which copies the clean version on top of the existing version.

    1. Create a new file. launchSettings.json.pristine in the same folder as your existing launch settings file.

    2. Add a pre build script to copy the clean file overwritting the IIS settings.

      cd ..\..\..\Properties copy launchSettings.json.pristine launchSettings.json

    This should effectively copy it over on build/run/etc.

提交回复
热议问题