Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create JSON file in Visual Studio 2017

I'm trying to follow a tutorial on JSONs and I follow the instruction: File > New > File...

and I search for the file type "JSON" which is not there.

Could someone tell me what I need to install please :

enter image description here

like image 980
Von Betelgeuse Avatar asked Dec 10 '18 14:12

Von Betelgeuse


2 Answers

You don't need to install any VS extension.

You can add the file like above or simply right click on the folder you want the file in. Add -> New Item. The file type doesn't really matter.

enter image description here

From there, type your file name and add the .json file extension. Visual Studio will recognize the extension and know that it is of type JSON.

enter image description here

enter image description here

like image 65
static_cast Avatar answered Nov 01 '22 18:11

static_cast


This is probably very late to give in an answer, but I too faced an issue with creating and opening JSON files in Visual Studio 2019. So I found out this workaround after some tinkering.

So first, open up Visual Studio Installer, Tools > Get Tools and Features

Open Visual Studio Installer

Then in the window that has just opened, select Desktop Development with C++

Desktop Development with C++

Then, from the right panel uncheck all the Optional downloads, especially the "MSVC v142..."

Uncheck optional downloads

After doing this you would get JSON editor under Individual components

JSON editor

Click Modify.

I hope this works out for you.

like image 36
Basil Victor Avatar answered Nov 01 '22 17:11

Basil Victor