docker dotnet Restore 的时候报错, 一度怀疑是linux的dotnet core sdk没有装好,
卸了装, 装了卸, 试了好几遍还是无效(Microsoft.Common.CurrentVersion.targets 这个文件的确又是存在的),
找度娘也没找到解决方案, 
/usr/share/dotnet/sdk/2.1.801/Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.ComponentModel.Annotations". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [xxxxxxx.csproj]

就一直在vs中瞎点, 当打开xxxx.csproj时发现, 我靠, 居然引用是绝对路径,

这个路径在windows中基本上一致, 不会有问题, 但突然一想, linux哪有C盘啊,

后边把System.ComponentModel.Annotations的引用换成成nuget中引用就可以了

docker build 错误 /usr/share/dotnet/sdk/2.1.801/Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference的更多相关文章

  1. docker学习之路-build asp.net core 2.2产生 warning MSB3245: Could not resolve this reference.错误的解决办法

    在docker build的时候有时我们可以直接使用dotnet publish来发布,但是如果用docker构建镜像的时候却会出现下面的错误: 解决办法:https://stackoverflow. ...

  2. cannot mount volume over existing file, file exists /var/lib/docker/overlay2/.../merged/usr/share/zoneinfo/UTC 解决

    问题产生原因: linux系统docker-compose.yml文件 放到 mac本启动发现启动报错 cannot mount volume over existing file, file exi ...

  3. Did you mean to run dotnet SDK commands

    把所有的net core的sdk,runtime,hosting通通卸载重新安装了2.1.1版本,发现再运行dotnet命令就是下面信息: C:\Users\Administrator>dotn ...

  4. Docker - 解决同步容器与主机时间报错:Error response from daemon: Error processing tar file(exit status 1): invalid symlink "/usr/share/zoneinfo/UTC" -> "../usr/share/zoneinfo/Asia/Shanghai"

    问题背景 这里讲解了如何同步容器和主机的时间:https://www.cnblogs.com/poloyy/p/13967532.html 其中使用方法二 docker cp /etc/localti ...

  5. 25.week4 docker build 也就是创建自己的image 上传image到dockerhub 从dockerhub下载images

    dado可以写你自己的名字 这个命令就会根据目录下的Dockerfile(固定用和这个名字)文件里面的内容 去下载并创建运行命令一步一步地 Setting up libxfixes3:amd64 (: ...

  6. docker build

    nginx Docfile ----------------------- FROM centos   MAINTAINER daniel   RUN yum install -y wget RUN ...

  7. .NET 5.0 Docker 镜像 错误修复方法

    在给eshopondapr 打镜像的时候碰到了3个错误 1.restore: Received an unexpected EOF or 0 bytes from the transport stre ...

  8. 5种常见的Docker Compose错误

    在构建一个容器化应用程序时,开发人员需要一种方法来引导他们正在使用的容器去测试其代码.虽然有几种方法可以做到这一点,但 Docker Compose 是最流行的选择之一.它让你可以轻松指定开发期间要引 ...

  9. linux下安装MySQL出错file /usr/share/mysql/charsets/latin2.xml from install of MySQL-......

    linux64 red hat 6.3企业版 开始错误装了32位mysql最后怎么也装不上64mysql了,折腾了一番最后全部卸载搞定: file /etc/init.d/mysql from ins ...

随机推荐

  1. centos7 安装Hadoop-2.6.0-cdh5.16.1.tar.gz

    准备Hadoop-2.6.0-cdh5.16.1.tar.gz 下载网址 http://archive.cloudera.com/cdh5/cdh/5/Hadoop-2.6.0-cdh5.16.1.t ...

  2. 【Gamma】Scrum Meeting 4

    目录 写在前面 进度情况 任务进度表 Gamma阶段燃尽图 照片 写在前面 例会时间:5.31 22:30-23:00 例会地点:微信群语音通话 代码进度记录github在这里 临近期末,团队成员课程 ...

  3. 【Beta】设计与计划

    目录 新增功能描述 小程序:按模块说明需求 用户权限模块 新闻模块 活动模块 社团模块 社团管理模块 小程序:按页面说明需求变化 新闻页 活动页/活动列表页 活动详情页 社团页 某类别社团页 社团详情 ...

  4. Mongodb聚合 时间分组(转载)

    // Requires official MongoShell 3.6+ use MediaNetDB; db.getCollection("TestCollection").ag ...

  5. Hash算法及java HashMap底层实现原理理解(含jdk 1.7以及jdk 1.8)

    现在很多公司面试都喜欢问java的HashMap原理,特在此整理相关原理及实现,主要还是因为很多开发集合框架都不甚理解,更不要说各种其他数据结构了,所以造成面子造飞机,进去拧螺丝. 1.哈希表结构的优 ...

  6. (转)Ngx_Lua使用分享

    原文:https://www.cnblogs.com/yanzi-meng/p/9450999.html ngx_lua 模块详细讲解(基于openresty)---https://www.cnblo ...

  7. Spring IoC 的实现机制

    Spring 中的 IoC 的实现原理就是工厂模式加反射机制. interface Fruit {     public abstract void eat(); } class Apple impl ...

  8. Python实用日期时间处理方法汇总

    这篇文章主要介绍了Python实用日期时间处理方法汇总,本文讲解了获取当前datetime.获取当天date.获取明天/前N天.获取当天开始和结束时间(00:00:00 23:59:59).获取两个d ...

  9. Flutter入门(二)

    * 网格布局 class HomeContent extends StatelessWidget { List<Widget> _getListData() { var tempList ...

  10. 自动以读写方式挂载ntfs(新)-苹果之路

    之前的mac下挂载ntfs磁盘的方法在新版本的macos下失效了:<自动以读写方式挂载ntfs-黑苹果之路>,现提供一个有效的方法,系统版本:白苹果10.14.6,参见<Mac OS ...