简体   繁体   English

VS 2015中无法解决Microsoft.NETCORE.app依赖项

[英]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.jsonproject.lock.json ,错误将自行解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在VS 2015中还原Microsoft.netcore.app依赖关系(未解决) - Microsoft.netcore.app Dependency unable to be restored in VS 2015 (not resolved) 找到框架“Microsoft.NETCore.App”,版本“5”时找不到 Microsoft.NETCore.App 5.0.0 - The framework 'Microsoft.NETCore.App', version '5' was not found while Microsoft.NETCore.App 5.0.0 is found .Net Core Classlib 错误地要求 Microsoft.NETCore.App 2.0.0 - .Net Core Classlib misrequires Microsoft.NETCore.App 2.0.0 检测到 package 降级:Microsoft.NETCore.App 从 2.1.3 到 2.1.0 - Detected package downgrade: Microsoft.NETCore.App from 2.1.3 to 2.1.0 无法找到版本为 (>= 3.1.0) 的 package Microsoft.NETCore.App - Unable to find package Microsoft.NETCore.App with version (>= 3.1.0) '在 Package 管理器控制台中找不到 Microsoft.NETCore.App 2.0.0 - 'Microsoft.NETCore.App 2.0.0 not found in Package Manager Console Microsoft.NETCore.App 和 Microsoft.NETCore.Platforms 的传递依赖项如何工作 - How does transitive dependencies for Microsoft.NETCore.App and Microsoft.NETCore.Platforms work 找不到指定版本的 Microsoft.NetCore.App 或 Microsoft.AspNetCore.App。 .net 6.0升级 - The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found. .net 6.0 upgrade .NET Microsoft.NETCore.App 和 Microsoft.WindowsDesktop.App 的 7 个应用程序提示 - .NET 7 application prompts for both Microsoft.NETCore.App and Microsoft.WindowsDesktop.App 解决错误“Microsoft.NETCore.App 1.0.0不支持框架.NETFramework,Version = v4.6.1” - Solving error “Microsoft.NETCore.App 1.0.0 does not support framework .NETFramework,Version=v4.6.1”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM