.Net Core 2.1.2 版本设置和控制器脚手架(序列不包含元素)

我一直困扰着 .Net core 2.1.2 更新。我们有一个 .Net 核心项目,我们正在两台不同的机器上开发它(win 10.0.17),有趣的事情来了;他有相同的项目,甚至相同的 sdk 和运行时更新,甚至还有vs2017 15.7.5更新。他可以毫无错误地运行和构建 Web Api,但我在 buildError 的图像名称中显示了几个问题。

第一的 

http://img2.mukewang.com/6161829700010d7408190791.jpg

第二

http://img.mukewang.com/616182a40001215008500923.jpg

第三

http://img1.mukewang.com/616182b10001e72d05770184.jpg

最后构建错误

http://img4.mukewang.com/616182c000017d2f14610552.jpg

Error       The project was restored using Microsoft.NETCore.App version 2.1.2, but with current settings, version 2.1.0 would be used instead.  To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish.  Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore.

哦,别忘了,这是我尝试添加新控制器时的错误。

http://img2.mukewang.com/616182cd0001365a06760170.jpg

如果我们解决了这个问题,我将不胜感激。

注意:我已经清除了 nuget 缓存文件。并没有工作。

下面,我的 csproj :

http://img.mukewang.com/616182d80001a60508180606.jpg

蝴蝶不菲
浏览 214回答 1
1回答

泛舟湖上清波郎朗

如果您有其他 .net Core SDK 和运行时,例如“.Net Core Runtime 2.1.302”和“.Net Core Runtime 2.1.301”,即使您下载了“.Net Core SDK 2.1.201”和“.Net Core” SDK 2.1.202"您只需要确定 SDK 和运行时的确切版本。我将在图片下方留下我的版本
打开App,查看更多内容
随时随地看视频慕课网APP