Aspnetcore: RC1 new Web Project's bower.json and package.json are missing from VS 2015 Pro IDE

Created on 19 Nov 2015  路  10Comments  路  Source: dotnet/aspnetcore

When creating new project in Visual Studio 2015, bower.json and package.json are missing from VS 2015 Pro IDE. They are actually there in the folder, so have to be added explicitly.
Just to let you know... Thank you for RC1:)

Most helpful comment

They should not be hidden. If you want us to use npm and bower please let us use it as the rest of the community does. Hiding them makes as much sense as if project.json was hidden.

All 10 comments

I just noticed that when you come back to the solution, those files are gone from IDE again, so they have to be explicitly added again, then they dissappear yet again. Something is not right.

those files are hidden on purpose by design now in the VS 2015 IDE, if you want to show them you need to click the icon to show all files in solution explorer. I think I saw this mentioned in Scott Hunter's video yesterday https://channel9.msdn.com/Events/Visual-Studio/Connect-event-2015/100 There is a new gui tool for managing bower components similar to nuget so I guess they hide the bower file to encourage use of the gui but you can show it if you want by clicking th show all files icon in solution explorer

@joeaudette thank you for the clarification

They should not be hidden. If you want us to use npm and bower please let us use it as the rest of the community does. Hiding them makes as much sense as if project.json was hidden.

@joeaudette Thank you. I was able to see the functionality for bower packages and show/hide files. Question, is there a Node Package Manager interface. Cannot find it. Thanks

@Lejdholt is right, please encourage users by good ui instead of hiding functionality

@developer1998 there is a NPM Scripts Task Runner VS extension, by Mads Kristensen, that is able to detect scripts commands from within package.json and show them in VS _Task Runner_ pane, but if I'm not wrong it needs you to right-click on file, so if file is not visibile we're back at square 1.

BTW: package.json (and bower.json) are really bread & butter of everyday client dev work. Anyone creating a web project _ought to_ know what they are and _ought to_ know how to work with them. Especially with the former, that's really unavoidable.

We strongly suggest to show them back _by default_. Or do as with VS Code, where you can hide single specific file & patterns in a custom way. Just our 2cents

Edit

Until default behaviour changes, manual actions are:

  1. On project, toggle _Show all files_ on
  2. Right-click on package.json file and choose _Show in Solution Explorer_
  3. On project, toggle _Show all files_ off again

@developer1998 to return npm and bower files in Solution Explorer, just remove <DnxInvisibleContent Include="bower.json" /> and <DnxInvisibleContent Include="package.json" /> from YourAwesomeProject.xproj

@Igmat Thanks! That was exactly what I needed to know! Perfect solution.

Please click there u will find it

olg9a

Was this page helpful?
0 / 5 - 0 ratings