Cleanly remove bower from an ASP.Net 5 project

笑着哭i 提交于 2020-01-02 00:57:14

问题


I'm using the ASP.Net 5 RC, but I don't want to use bower, I want to use NPM to manage all of my dependencies.

I have removed bower.json, removed the bower install command from project.json and specifically removed each package using bower uninstall.

However, it stil shows up in the solution explorer:

Is there any way to properly remove it, or is this just the way ASP.Net 5 is supposed to be used?

Thanks


回答1:


Turns out, the key is to remove the DnxInvisibleContent tag inside ItemGroup in the xproj file.

My ItemGroup section now looks like this:

<ItemGroup>
    <DnxInvisibleContent Include=".bowerrc" />
    <DnxInvisibleContent Include="package.json" />
</ItemGroup>



回答2:


Once you delete all the packages from bower and remove bower from project then you need to close and reopen vs so that the bower explorer can go away.

that's what worked for me...



来源:https://stackoverflow.com/questions/34342909/cleanly-remove-bower-from-an-asp-net-5-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!