当你打开一个.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. Java Persistence/ManyToMany

    A ManyToMany relationship in Java is where the source object has an attribute that stores a collecti ...

  2. Java系列1 -- 浅谈面向对象

    也许每一个计算机专业的人,在大学学习java的时候,老师开始时都会说这么一句话,"Java是一门面向对象的语言".那么面向对象到底是什么,他有什么好处,或者他比其他流行的语言C/C ...

  3. http2.0与http1.X的区别

    此文只是方便重看,原文在:http://www.mamicode.com/info-detail-1199706.html 1.1 HTTP应用场景 http诞生之初主要是应用于web端内容获取,那时 ...

  4. Java 读书笔记 (六) 引用类型

    Java里使用long类型的数据要在数值后面加上L,否则会作为整型解析. 引用类型 引用类型是一个对象类型,它的值是指向内存空间的引用,就是地址, 所指向的内存中保存着变量所表示的一个值或一组值. i ...

  5. []T 还是 []*T, 这是一个问题

    全面分析Go语言中的类型和类型指针的抉择 目录 [−] 副本的创建 T的副本创建 *T的副本创建 如何选择 T 和 *T 什么时候发生副本创建 最常见的case map.slice和数组 for-ra ...

  6. Centos打开、关闭、结束tomcat,及查看tomcat运行日志

    cd到tomcat目录下之后 启动:一般是执行sh bin/startup.sh 停止:一般是执行sh bin/shutdown.sh查看:执行ps -ef |grep tomcat 输出如下 *** ...

  7. Python数据结构应用2——Queue

    Reference: Problem Solving with Algorithms and Data Structures, Release 3.0 队列 Queue 建立 class Queue: ...

  8. selenium处理iframe定位于切换问题解决办法

    首先还是围绕以下几个方面来看: 1.什么是iframe? 2.为什么我们要定位iframe? 3.我们怎样定位iframe,与切换iframe? 1.什么是iframe? ♦ b/s架构都使用ifra ...

  9. C语言——输入输出函数

    0.getchar().putchar() 输入缓冲区,键盘输入是"行缓冲"遇到一个换行符的时候清空缓冲区. 标准流,stdin和stdout,是标准的输入输出流,键盘输入就是用的 ...

  10. vue+axios访问本地json数据踩坑点

    当我们想在vue项目中模拟后台接口访问json数据时,我们发现无论如何也访问不到本地的json数据. 注意:1.在vue-cli项目中,我们静态资源只能放在static文件夹中,axios使用get请 ...