当你打开一个.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. RPC详解

    RPC(Remote Procedure Call),即远程过程调用,是一个分布式系统间通信的必备技术,本文体系性地介绍了 RPC 包含的核心概念和技术,希望读者读完文章,一提到 RPC,脑中不是零碎 ...

  2. 关于Linux虚拟化技术KVM的科普 科普五(From 世民谈云计算)

    另一位大神写到KVM文章,KVM 介绍(1):简介及安装.KVM 介绍(2):CPU 和内存虚拟化.KVM 介绍(3):I/O 全虚拟化和准虚拟化 [KVM I/O QEMU Full-Virtual ...

  3. 静态资源压缩(GZIP) 专题

    1.开GZIP有什么好处?答:Gzip开启以后会将输出到用户浏览器的数据进行压缩的处理,这样就会减小通过网络传输的数据量,提高浏览的速度.Tips:如果网站的用户分布比较分散,并且静态文件过大,可以将 ...

  4. 关于for循环里面异步操作的问题

    首先来看一个比较简单的问题,我们想实现的就是每隔1s输出0-4的值,就是这么简单,看下错误写法: function test() { for (var i = 0; i < 5; ++i) { ...

  5. CentOS6.*安装gitolite

    http://www.kankanews.com/ICkengine/archives/64748.shtml 2人收藏此文章, 发表于4小时前(2013-10-22 16:12) , 已有26次阅读 ...

  6. Python将html转化为pdf

    前言 前面我们对博客园的文章进行了爬取,结果比较令人满意,可以一下子下载某个博主的所有文章了.但是,我们获取的只有文章中的文本内容,并且是没有排版的,看起来也比较费劲... 咋么办的?一个比较好的方法 ...

  7. BZOJ_1132_[POI2008]Tro_计算几何

    BZOJ_1132_[POI2008]Tro_计算几何 Description 平面上有N个点. 求出所有以这N个点为顶点的三角形的面积和 N<=3000 Input 第一行给出数字N,N在[3 ...

  8. 阿里巴巴Java开发程序猿年薪40W是什么水平?

    对于年薪40万的程序员,不只是技术过硬,还有一个原因是他们所在的公司福利高,或者会直接持股.在BAT中就是一个很好的案例,例如阿里巴巴P7,P8级别的员工不仅是年薪30到80万不等,还有更多股票持有. ...

  9. 一种非常巧妙的读取串口数据的方法--C#

    读取不完就一直等待,读完了就立刻走,之前都是设置一个溢出时间,不管是不是早就读取完了都要在这等着,有一定的时间浪费. 注意,用之前要设置好SerialPort类的TimeOut属性:

  10. 我的微服务观,surging 2.0将会带来多大的改变

    Surging 自2017年6月16日开源以来,已收到不少公司的关注或者使用,其中既有以海克斯康超大型等外企的关注,也不乏深圳泓达康.重庆金翅膀等传统行业的正式使用,自2019年年初,surging2 ...