Visual Studio 2015 RC 中的引用错误 ASP.NET 5 Web 应用程序

References error in Visual Studio 2015 RC in ASP.NET 5 Web Application

我有一个 ASP.NET 5 MVC 应用程序,但无法恢复引用,因为我进入了解决方案资源管理器 "References (Errors - see error list)",在错误列表中我有:

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

我什至将项目移动到根文件夹以缩短路径 - 但没有结果,在我恢复 NPM 包后出现错误,这些包是我使用的包:

  "devDependencies": {
"grunt": "0.4.5",
"grunt-contrib-uglify": "0.8.0",
"grunt-contrib-watch": "0.6.1",
"grunt-bower-task": "0.4.0",
"grunt-contrib-less": "1.0.1",
"less-plugin-autoprefix": "1.4.1"
 },
 "dependencies": {
     "grunt-contrib-uglify": "^0.8.0"
 }

一个一个的npm包去掉后,发现这家伙有罪:

 "grunt-bower-task": "0.4.0"

我想,一些 bower 包的文件名很长,将通过一个一个地删除 bower 包来进一步调查它(我的应用程序中有很多)。但如果有人有更好的方法,请帮助。

正在删除 bower 包(甚至所有包都没有帮助)所以看起来这是 grunt-bower-task npm 包的问题。

删除 [PROJECT]/node_modules/grunt-bower-task/[complaining] 中的投诉文件夹并重试

添加到 project.json:

 "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
]

解决了问题(我没有这个,因为 project.json 是在 VS2015 的早期测试版中创建的)