Visual Studio 2015 无法启动 IIS Express [英] Visual Studio 2015 can't start IIS Express

查看:34
本文介绍了Visual Studio 2015 无法启动 IIS Express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 Visual Studio 2015 中运行 ASP.Net Core 项目时,Microsoft Visual Studio 对话框出现该项目不知道如何运行配置文件 IIS Express".

When I am trying to run an ASP.Net Core project in Visual Studio 2015, a Microsoft Visual Studio dialog appears "The project doesn't know how to run the profile IIS Express".

有没有人知道这条消息,或者如何解决它?我搜索过谷歌和 MSDN.构建日志或 Windows 事件日志中没有任何内容.

Does anyone know anything about this message, or how to fix it? I've searched Google and the MSDN. There's nothing in the build logs, or the Windows event log.

推荐答案

当我将一个项目从 dotnet RC1 迁移到 RC2 时,这个对话框出现了.

This dialog showed up for me when I had migrated a project from dotnet RC1 to RC2.

在修复之前,我仍然可以使用 dotnet run 并从 Visual Studio 中选择IIS Express"以外的配置文件来运行它.

Before the fix I could still run it using dotnet run and from Visual Studio choosing the profile other than "IIS Express".

我误读了这个引导而忘记了.Web

DNXMicrosoft.DNX.targets –>DotNet.WebMicrosoft.DotNet.Web.目标

DNXMicrosoft.DNX.targets –> DotNet.WebMicrosoft.DotNet.Web.targets

修复此问题并重新启动 Visual Studio(不确定是否需要)后,我可以使用 IIS Express 配置文件运行该项目.

After fixing this and restarting Visual Studio(not sure if needed) I could run the project using the IIS Express profile.

还需要注意的是,根据注释,在xproj中需要在顶级节点添加.Web. 应该是 .

Should also be noted that as per the comments, adding .Web in the top level node is required in the xproj. <Project Sdk="Microsoft.NET.Sdk"> should be <Project Sdk="Microsoft.NET.Sdk.Web">.

这篇关于Visual Studio 2015 无法启动 IIS Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆