当你打开一个.net core的项目,Visual Studio 可能无法打开,提示如下错误:

D:\workshop\Github\Ocelot\src\Ocelot\Ocelot.csproj : error  : Project file is incomplete. Expected imports are missing.

D:\workshop\Github\Ocelot\test\Ocelot.UnitTests\Ocelot.UnitTests.csproj : error  : Project file is incomplete. Expected imports are missing.

D:\workshop\Github\Ocelot\test\Ocelot.AcceptanceTests\Ocelot.AcceptanceTests.csproj : error  : Project file is incomplete. Expected imports are missing.

D:\workshop\Github\Ocelot\test\Ocelot.ManualTest\Ocelot.ManualTest.csproj : error  : Project file is incomplete. Expected imports are missing.

D:\workshop\Github\Ocelot\test\Ocelot.Benchmarks\Ocelot.Benchmarks.csproj : error  : Project file is incomplete. Expected imports are missing.

D:\workshop\Github\Ocelot\test\Ocelot.IntegrationTests\Ocelot.IntegrationTests.csproj : error  : Project file is incomplete. Expected imports are missing.

D:\workshop\Github\Ocelot\src\Ocelot\Ocelot.csproj : error  : Project file is incomplete. Expected imports are missing.

这个错误的原因是项目通过global.json 指定了项目的SDK版本,比如Ocelot的global.json 指定了2.1.301

{
   "projects": [ "src", "test" ],
   "sdk": {
     "version": "2.1.301"
   }

}

我的机器上没有安装这个版本的SDK,解决方法就是安装这个版本的SDK。

Project file is incomplete. Expected imports are missing 错误解决方案的更多相关文章

  1. Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. T

    错误提示: Severity Code Description Project File Line Suppression StateError This project references NuG ...

  2. NuGet Packages are missing,This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.

    错误内容 This project references NuGet package(s) that are missing on this computer. Use NuGet Package R ...

  3. This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567.

    记事本打开csproj文件 搜索nuget 删除Target节点 类似如下: <Target Name="EnsureBclBuildImported" BeforeTarg ...

  4. SVN Cornerstone 报错信息 xcodeproj cannot be opened because the project file cannot be parsed.

    svn点击update 之后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened becausethe project file cannot be p ...

  5. Xcode 工程文件打开不出来, cannot be opened because the project file cannot be parsed.

    svn更新代码后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened because the project file cannot be parsed ...

  6. Xcode工程文件打不开:cannot be opened because the project file cannot be parsed

    svn更新代码后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened because the project file cannot be parsed ...

  7. IOS bug之cannot be opened because the project file cannot be parsed

    刚才用Cornerstone更新代码后,再次打开项目时,不能打开,提示cannot be opened because the project file cannot be parsed后来在网上查了 ...

  8. .xcodeprok cannot be opened because the project file cannot be parsed

    用svn更新代码后,打开xcode工程文件出现 xxx..xcodeproj cannot be opened because the project file cannot be parsed. 这 ...

  9. windows下安装pywin32报错:close failed in file object destructor:sys.excepthook is missing lost sys.stderr

    今晚要写搜索引擎作业,搭scrapy环境,遇到了下面问题: windows下安装pywin32报错:close failed in file object destructor:sys.excepth ...

随机推荐

  1. 导航狗IT周报-2018年05月18日

    原文链接:https://www.daohanggou.cn/2018/05/18/it-weekly-8/ DDoS专题 最近Web安全里的一个热点就是包括阮一峰博客在内的多个教育类IT网站被DDo ...

  2. 页面获取Spring Security登录用户

    1.在session中取得spring security的登录用户名如下:${session.SPRING_SECURITY_CONTEXT.authentication.principal.user ...

  3. DW自动换行

    查看→代码视图选项→自动换行

  4. Protostuff序列化分析

    前言最近项目中需要将业务对象直接序列化,然后存数据库:考虑到序列化.反序列化的时间以及生产文件的大小觉得Protobuf是一个很好的选择,但是Protobuf有的问题就是需要有一个.proto的描述文 ...

  5. 【bzoj 3233】[Ahoi2013]找硬币 ——搜索

    Description 小蛇是金融部部长.最近她决定制造一系列新的货币.假设她要制造的货币的面值为x1,x2,x3… 那么x1必须为1,xb必须为xa的正整数倍(b>a).例如 1,5,125, ...

  6. 网络流解线性规划问题 BZOJ1061: [Noi2008]志愿者招募

    线性规划定义: 在给定有限的资源和竞争约束情况下,很多问题都可以表述为最大化或最小化某个目标.如果可以把目标指定为某些变量的线性函数,而且如果可以将资源约束指定为这些变量的等式或不等式,则得到了一个线 ...

  7. hkws摄像头拆机

  8. 【公告】关于8.8MIP组件审核平台故障的说明

    故障通报 2017 年 8 月 8 日 下午 14:11,由于机器故障原因,MIP 组件管理平台暂时无法提供服务. 2017 年 8 月 8 日 下午 16:46, 故障已解决.MIP 组件管理平台服 ...

  9. 怎么动态生成js变量

    动态生成全局变量: //简单的用字符串作为变量名 window['hello'] = "hello, world"; alert(hello);   //批量定义 for(var  ...

  10. 死磕 java集合之LinkedBlockingQueue源码分析

    问题 (1)LinkedBlockingQueue的实现方式? (2)LinkedBlockingQueue是有界的还是无界的队列? (3)LinkedBlockingQueue相比ArrayBloc ...