Add new json file in visual studio opens a hexadecimal


  • Hi,

    I am trying to add a json file to my project from add new item menu (add > new item > file.json) but the file it opens is a hex file and I can not manage to open normal json file. But project.json that solution opens when you create it is normal json an can edit it normally. Anyone know how can I solve this thing? Thanks a lot.

    edit: by the way it's asp.net5 mvc6 project

    Mustafa Yılmaz

    Best Regards, Mustafa Yılmaz MCITP, MCPD | |

    • Edited by Mustafa.Yılmaz Wednesday, February 3, 2016 1:11 PM added project details
    Wednesday, February 3, 2016 12:24 PM


  • If you cannot open the file with Notepad or another text editor, then the file is probably corrupt (contains several zero bytes only).

    Also try this: right-click the file in Solution Explorer, then “Open With”, then select “JSON Editor”.

    The problem maybe is caused by out of order Visual Studio, which should be repaired or re-installed. (Perhaps a template file is corrupted).

    A workaround: duplicate the project.json file dragging with mouse and holding <Ctrt> key. Then rename the new file and edit it.

    Wednesday, February 3, 2016 4:34 PM