[英].NetCoreApp 1.1 - Default Visual Studio 2017 .NET Core Project Broken?
I'm starting today to try and get to grips with the new .NET Core framework. 我今天开始尝试尝试掌握新的.NET Core框架。 So I installed Visual Studio 2017 Enterprise and .NET Core Workload as per the following link:
因此,我根据以下链接安装了Visual Studio 2017 Enterprise和.NET Core Workload:
https://www.microsoft.com/net/core#windowsvs2017 https://www.microsoft.com/net/core#windowsvs2017
I thought I would give a go at creating Class Library, so I created a new .NET Core Library project, which defaults to target framework .NETCoreApp 1.1 : 我以为我会乐于创建类库,所以我创建了一个新的.NET Core库项目,该项目默认为目标框架.NETCoreApp 1.1 :
Now when the solution is created, the Nuget package restore fails for every package and not even System namespace is referenced correctly. 现在,创建解决方案时,Nuget软件包还原对于每个软件包都将失败,甚至无法正确引用系统名称空间。 FYI, the full error output for the restore can be found here (pastebin).
仅供参考,可以在此处找到完整的还原错误输出(pastebin)。
Now if I can change the target framework to .NETCoreApp 1.0 then the errors clear themselves up. 现在,如果我可以将目标框架更改为.NETCoreApp 1.0,则错误会自行清除。 So this is the confusion for myself a Core nOOb - I see 1.1 is available, but can i use it for Class Libraries or should i be targeting 1.0?
因此,这对我自己来说是一个核心nOOb的困惑-我看到1.1可用了,但是我可以将其用于类库还是应该以1.0为目标?
Also, my nuget source is the following: 另外,我的nuget来源如下:
https://api.nuget.org/v3/index.json https://api.nuget.org/v3/index.json
UPDATE: 更新:
In the end I uninstalled all of the .NET SDK references (Windows: Add or Remove Programs ) and re-installed .NET Core using the Visual Studio 2017 workload using the Visual Studio Installer : 最后,我卸载所有.NET SDK引用(Windows系统: 添加或删除程序 ),使用使用Visual Studio安装程序在Visual Studio 2017年的工作量,并重新安装了.NET的核心:
I had to open the Solution I have created, re-save it (for some reason), close Visual Studio, then re-open the Solution - this fixed issues with red squiggly lines everywhere and incorrect errors with "Cannot reference...." . 我必须打开我创建的解决方案,重新保存它(出于某种原因),关闭Visual Studio,然后重新打开解决方案-这个已解决的问题是到处都是红色的波浪线,并且出现了错误的错误“无法引用...。 “ 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.