问题
I've just upgraded to VS2019 Pro. I was setting up the new Solution Filters feature to allow me to partially load my solutions with only the dependencies for the project I am working on and hit a problem loading (or reloading) an ASP.Net MVC Web Project.
See here: https://youtu.be/u5YauFxb2Ho?t=783
What I did was close my solution and then go to the new Start Page and select Open a project or solution.
Then browse to the *.sln file for the solution and tick the "Do not load projects" checkbox so that the solution opens but no projects are loaded.
When I right clicked the Web Project and chose "Reload Project" I got a "Value does not fall within the expected range" error.
回答1:
Turns out (after looking in the Output Window - yes, I know) the problem was that VS couldn't launch IIS Express due to a lack of permissions.
Just close and re-launch VS2019 as Administrator, re-load the Web Project and IIS Express will start this time and all will be well with your world.
来源:https://stackoverflow.com/questions/57852467/visual-studio-2019-value-does-not-fall-within-the-expected-range-when-reloading