[英]Microsoft.NETCORE.app dependency not resolved in VS 2015
I am having issues with Visual Studio 2015 that when I create a new CORE 1.0 project the references show an error that says that .NETCoreApp cannot be resolved. 我在Visual Studio 2015中遇到问题,当我创建一个新的CORE 1.0项目时,引用显示了一个错误,该错误表明无法解析.NETCoreApp。 When I open the project.json file Microsoft.NETCore.App is underlined and the solution to fix it is to "sort properties". 当我打开project.json文件时,Microsoft.NETCore.App文件带有下划线,解决该问题的解决方案是“对属性进行排序”。
I have installed VS 2015 update 3 and also .net core tools preview 2. 我已经安装了VS 2015更新3和.net核心工具预览2。
The sort properties does work but I also notice that intelisense is broken in the projects.json file when trying to add dependencies. 排序属性确实起作用,但我还注意到在尝试添加依赖项时intelisense在projects.json文件中损坏了。
I am a newbie to .net and VS2015 and I am trying to work out of books and tutorials. 我是.net和VS2015的新手,因此正在尝试制作书籍和教程。
Thanks 谢谢
Resolved.... I failed to add that this was a Windows 10 VM running in parallels on MAC and the projects directory was defaulted to the MAC home drive so it looked like a UNC share "\\MAC\\Home\\" etc. Once I changed to saving to a letter drive everything looked good. 解决....我未能添加这是Windows 10 VM在MAC上并行运行,并且项目目录默认为MAC主驱动器,因此它看起来像UNC共享“ \\ MAC \\ Home \\”等。改成了存盘,一切看起来都不错。 Thanks to a coworker that started remembering that he had the same issue a long time ago. 多亏一位同事开始记得他很久以前也遇到过同样的问题。 Thanks Nate for trying to help. 感谢Nate的帮助。
Resolved... 解决...
Entered tools -> Nuget Package Manager -> Manage Nuget Packages For Solution 输入的工具-> Nuget软件包管理器->管理解决方案的Nuget软件包
And uninstalled Microsoft.AspNetCore.Server.ISSIntegration then reinstalled it. 然后卸载了Microsoft.AspNetCore.Server.ISSIntegration,然后重新安装了它。
It automatically got all the other dependencies here 它会自动在这里获取所有其他依赖项
"dependencies": { "Microsoft.NETCore.App": { "version": "1.0.1", "type": "platform" }, "Microsoft.AspNetCore.Diagnostics": "1.0.0", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", "Microsoft.Extensions.Logging.Console": "1.0.0" }, “依赖关系”:{“ Microsoft.NETCore.App”:{“版本”:“ 1.0.1”,“类型”:“平台”},“ Microsoft.AspNetCore.Diagnostics”:“ 1.0.0”,“ Microsoft。 AspNetCore.Server.IISIntegration“:” 1.1.0“,” Microsoft.AspNetCore.Server.Kestrel“:” 1.0.1“,” Microsoft.Extensions.Logging.Console“:” 1.0.0“},
Then Restarted Visual Studio and solution build succeeded. 然后重新启动Visual Studio,解决方案构建成功。
您也可以从解决方案中删除以下文件: project.fragment.lock.json
和project.lock.json
,错误将自行解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.