Visual Studio 2017 Doesn't Run Core Apps with IIS Express

后端 未结 2 883
不思量自难忘°
不思量自难忘° 2021-02-08 23:07

I am having an issue with Visual Studio 2017 RC where when I run an MVC and/or WebAPI app using IIS Express the app never actually runs. Instead I get stuck with a page in the b

相关标签:
2条回答
  • 2021-02-08 23:33

    I had this same issue and after digging around for a while I discovered that I had dotnet preview v1.0.0-preview2 installed under Programs Files (x86) and a non-preview version in x64. I think VS is launching the x86 (preview) version but expecting to see the full version. To fix this, I did the following.

    • from programs and feature uninstall every visible dotnet core. (note: for me this did not remove the x86 preview)
    • go to https://www.microsoft.com/net/download/core#/sdk and install BOTH x86 and x64 SDK packages
    • open command line and from the root directory check run: dotnet --version (at the time of writing it was 1.0.4)
    • fire up .net core project in VS 2017 and run.

    When I did all of the above, I was able to start up the site in IIS Express from VS.

    0 讨论(0)
  • 2021-02-08 23:47

    You could follow or upvote the issue: https://developercommunity.visualstudio.com/content/problem/11391/aspnet-core-iis-express-httplocalhost51733-failed.html

    Looks like our workarounds meanwhile are

    • dotnet run
    • Publish to local IIS. Which is working for me.
    • (Untested: downgrade from core-1.1 to core-1.0)

    If you aren't familiar with VS2017/asp.net:

    You have, or can reveal via View Menu-->Other Toolbars :

    Debug toolbar --> dropdowncombobutton saying "[green arrow>] IIS Express"

    • Click on the dropdown downarrow part of the button.

    You should see a Run {yourprojectname} option. This is the equivalent of dotnet run {yourprojectname} from the commandline.

    You can configure the options that appear in the dropdown with

    Right-click on project in solution explorer --> Properties --> Debug

    0 讨论(0)
提交回复
热议问题