当你打开一个.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. python 文件的写删改

    # coding=utf-8 # !/usr/bin/python # -*- coding: UTF-8 -*- import io import os def file_chance(): #修改 ...

  2. 在docker上运行.net core程序

    一.安装docker及镜像 1.在centos上安装docker,命令如下: # yum install docker 2.让docker随机启动: # service docker start# c ...

  3. SSIS 调试和故障排除

    SSIS内置的调试工具是非常完备的,主要是设置断点和查看变量值,这是在Package的设计阶段可以使用的工具,在Package部署到服务器之后,用户还可以使用事件处理程序以实现Package出错的自我 ...

  4. BZOJ_1132_[POI2008]Tro_计算几何

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

  5. BZOJ_1097_[POI2007]旅游景点atr_状压DP

    BZOJ_1097_[POI2007]旅游景点atr_状压DP 题面描述: FGD想从成都去上海旅游.在旅途中他希望经过一些城市并在那里欣赏风景,品尝风味小吃或者做其他的有趣 的事情.经过这些城市的顺 ...

  6. MDK5使用Jlink下载显示 no cortex m sw divice 解决办法

    问题: (1)下面界面中找不到设备 (2)下载程序的时候提示" no cortex m sw divice " 然后是"target dll has been cance ...

  7. 【CTF 攻略】CTF比赛中关于zip的总结

    [CTF 攻略]CTF比赛中关于zip的总结   分享到: --> 本文首发于安全客,建议到原地址阅读,地址:http://bobao.360.cn/ctf/detail/203.html 前言 ...

  8. centos7 启动docker失败的解决

    控制端使用yum install docker安装完成docker后启动docker失败,出现以下信息: Job for docker.service failed because the contr ...

  9. js操作中要去注意的一些问题

    1.js中注意问题 font-size 改成fontSize padding-top 改成paddingTop js中不认识-,所以要以小驼峰方式操作属性或者以[" "]方式,例[ ...

  10. Android 7.0 存储系统—Vold与MountService分析(二)(转 Android 9.0 分析)

    Android的存储系统(二) 回顾:前贴主要分析了Android存储系统的架构和原理图,简要的介绍了整个从Kernel-->Vold-->上层MountService之间的数据传输流程, ...