重新加载 Web 项目时,Visual Studio 2019 值不在预期范围内 [英] Visual Studio 2019 Value does not fall within the expected range when reloading web project
问题描述
我刚刚升级到 VS2019 Pro.我正在设置新的 解决方案过滤器 功能,以允许我仅使用我正在处理的项目的依赖项部分加载我的解决方案,并在加载(或重新加载)ASP.Net MVC Web 时遇到问题项目.
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.
请参阅此处: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.
然后浏览到解决方案的 *.sln 文件并勾选不加载项目"复选框,以便打开解决方案但不加载任何项目.
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.
当我右键单击 Web 项目并选择重新加载项目"时,出现值不在预期范围内"错误.
When I right clicked the Web Project and chose "Reload Project" I got a "Value does not fall within the expected range" error.
推荐答案
结果(在查看输出窗口后 - 是的,我知道)问题是由于缺乏权限,VS 无法启动 IIS Express.
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.
只需关闭并重新以管理员身份启动 VS2019,重新加载 Web 项目,这次 IIS Express 将启动,一切都会好起来的.
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.
这篇关于重新加载 Web 项目时,Visual Studio 2019 值不在预期范围内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!