简体   繁体   English

JSON 文件类型在 Visual Studio 2019 的添加新项目中丢失

[英]JSON file type missing in Add new item of Visual studio 2019

I am using Visual Studio 2019. I need to add a JSON file to add the test data.我使用的是 Visual Studio 2019。我需要添加一个 JSON 文件来添加测试数据。 But JSON file type is missing in Add new item tab.但是添加新项目选项卡中缺少 JSON 文件类型。 I have used Console application (.NET Framework)我使用过控制台应用程序(.NET Framework)

You can get it in Add New Item -> Web -> Markup -> JSON File您可以在Add New Item -> Web -> Markup -> JSON File中获得它

在此处输入图像描述

Or easiest way is to search it in Search box.或者最简单的方法是在搜索框中搜索它。

在此处输入图像描述


If web option is not visible on your machine that means while installation you have not selected option ASP.NET and web development tool .如果 web 选项在您的机器上不可见,这意味着在安装时您没有选择选项ASP.NET and web development tool

Modify your installation and install web development tool on your machine.修改您的安装并在您的机器上安装 web 开发工具。

If you want quick solution then, in add new item window change extension of .cs file to .json it will create json file for you如果您想要快速解决方案,则添加新项目 window 将.cs文件的扩展名更改为.json它将为您创建 json 文件

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

相关问题 Visual Studio 2019无法将新文件添加到我的项目中 - Visual Studio 2019 fails to add a new file to my project Visual Studio社区2013年缺少C#添加新项 - Visual Studio Community 2013 Missing C# Add New Item Visual Studio Community 2019 16.5.3 与 Blazor 应用程序 -> 添加 -> 新项目 -> Razor 组件 -> 路由或组件未呈现 - Visual Studio Community 2019 16.5.3 with Blazor App -> Add -> New Item -> Razor Component -> Route or component is not rendered 如何在 Visual Studio 2019 中添加 .mdf 文件? - How to add .mdf file in Visual Studio 2019? 无法在 Visual Studio 2019 中添加新的 C# windows 表单 - Cannot add a new C# windows form in Visual Studio 2019 在 Visual Studio 2019 中添加新数据源失败 - Add new Data source in Visual Studio 2019 Faild 是否可以在Visual Studio中向“添加现有项”对话框添加新的文件过滤器? - Is it possible to add new file filter to Add Existing Item dialog in visual studio? 无法在 Visual Studio 2019 Preview 和 Visual Studio 2019 中添加引用 - Unable to add references in Visual studio 2019 Preview and Visual Studio 2019 文件被 Visual Studio 2019 锁定 - File is locked by Visual Studio 2019 缺少 Visual Studio 2019 数据表可视化工具 - Visual Studio 2019 Datatable visualizer missing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM