最新消息:20210917 已从crifan.com换到crifan.org

【已解决】VS2017中新建ASP .NET Web的项目模板中找不到Web API

Web crifan 660浏览 0评论
折腾:
【调研】VS2017中如何开发REST的Windows服务
期间,去参考:
Get Started with ASP.NET Web API 2 (C#) | Microsoft Docs
https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
中文翻译版本:
开始使用 ASP.NET Web API 2 (C#) | Microsoft Docs
https://docs.microsoft.com/zh-cn/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
后来在:
Build RESTful APIs with ASP.NET Web API | Microsoft Docs
https://docs.microsoft.com/en-us/aspnet/web-api/overview/older-versions/build-restful-apis-with-aspnet-web-api
也看到了类似的:
结果:
新建:
此处并没有 Web API可供选择 :
点击 了解更多:
ASP.NET 概述 | Microsoft Docs
https://docs.microsoft.com/zh-cn/aspnet/overview
VS2017 new project cannot see Web API
点击 打开Visual Studio 安装程序
还是找不到哪里有包含Web API
asp.net – Can’t find web application template in Visual Studio 2015 Community – Stack Overflow
https://stackoverflow.com/questions/34313991/cant-find-web-application-template-in-visual-studio-2015-community
VS2017  cannot see Web API template
visual studio 2015 web api – no web api template – Stack Overflow
抽空去安装:
Visual Studio Enterprise 2017
试试之后是否有
后来自己试出来了:
框架 要是 >= .NET Framework 4.5版本之后,才能看到:WebAPI
【总结】
估计是ASP. NET Web中,Web API只是针对于4.5之后才有,所以:
最开始用.NET Framework 4.0的ASP .NET Web中,是没有Web API的。
而.NET Framework 4.5之后,就可以看到Web API了。

转载请注明:在路上 » 【已解决】VS2017中新建ASP .NET Web的项目模板中找不到Web API

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
92 queries in 0.205 seconds, using 23.43MB memory