繁体   English   中英

从 VS 2019 运行 VS 2017 项目?

[英]Running a VS 2017 project from VS 2019?

我是 Asp.Net 的新手。 我使用 VS 2017 制作了一个项目(更早),该项目运行良好(上次使用)。

最近,我将我的 VS 2017 更新为 VS 2019; 现在使用 VS 2019 我的项目没有运行。

我早期的项目 (PersonDetails) 位于C:\\Users\\HP\\source\\repos\\PersonDetails目录中,该目录包含以下文件和文件夹:

  • .vs
  • 包裹
  • 人物详细信息
  • 个人资料.sln

现在,当我尝试在 VS 2019 中运行该项目时,在浏览器上显示以下错误

HTTP 错误 403.14 - Forbidden Web 服务器配置为不列出此目录的内容。

Most likely causes:
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.

Things you can try:
If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
Enable directory browsing.
Go to the IIS Express install directory.
Run appcmd set config /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the server level.
Run appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the site level.
Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.

Detailed Error Information:
Module     DirectoryListingModule
Notification       ExecuteRequestHandler
Handler    StaticFile
Error Code     0x00000000
Requested URL      http://localhost:49236/
Physical Path      C:\Users\HP\source\repos\PersonDetails\PersonDetails
Logon Method       Anonymous
Logon User     Anonymous

More Information:
This error occurs when a document is not specified in the URL, no default document is specified for the Web site or application, and directory listing is not enabled for the Web site or application. This setting may be disabled on purpose to secure the contents of the server.
View more information »

此外,当我在 VS 2019 中构建新项目时,它运行正常。 新项目(第一个)位于C:\\Users\\HP\\source\\repos\\first目录中,该目录包含以下文件:

.vs

bin

obj

properties

appsettings.Developement.json

appsettings.json

first.csproj

first.sln

Program.cs

Startup.cs

为了在 VS 2019 中运行项目(PersonDetails),可以进行哪些可能的修改?

感谢那些愿意提供帮助的人。 :-)

我不知道我是否正确理解了你的问题。 我以前也遇到过同样的问题。 请单击您的第一个项目(.sln 文件)并选择使用 vs 2019 打开。之后,单击解决方案资源管理器中的所有项目并选择重新加载它们。 当您重新加载所有这些时,单击您的主项目并选择设置为开始。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM