ASP.NET Core prefers JSON over XML for configuration and earlier I posted about all different JSON files present in new ASP.NET Core solution. And one of the JSON configuration file is Package.json and it is the place for npm modules. But when you won’t find this file in solution explorer for your ASP.NET Core project, as by default, this file is hidden. In this short post, you will find various way to make this file visible in Solution explorer.
Solution to show package.json
There are 3 different solutions to show visible in Visual studio solution explorer.
1. Show all files option in solution explorer
Click on “Show all files” option in solution explorer but this will show all the other hidden files as well.
2. Via Open Package.json option
Expand Dependencies folder -> and right-click on npm folder and select “Open Package.json”.
3. Modify your xproj file
Your project file is no more having extension as .csproj. It is now .xproj as mentioned in Quick summary of what’s changed in ASP.NET Core 1.0. The new project file doesn’t include manifest and list of all the files that are include in your project, as earlier with .csproj. But this file does contain code to hide package.json. Delete following line from .xproj file to show package.json in solution explorer. Really not sure why this file is hidden.
That’s all folks. If you know any other way then please put in comments section. Till then Keep visiting this blog and share this in your network. Please put your thoughts and feedback in the comments section.