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. zookeeper(一) 原理

    参考文档:http://cailin.iteye.com/blog/2014486/ http://www.uml.org.cn/zjjs/201707282.asp?artid=19686 一.zo ...

  2. Postman 插件安装和使用

    1.google商店 搜索“谷歌访问助手” 2.在商店搜索Postman 3.安装Postman 4.访问chrome://apps/  5.点击postman

  3. 工具系列 | PHPSTROM 连接Docker容器 && 配置XDEBUG调试

    Docker 客户端配置 PHPSTROM 配置 选择连接 容器日志 配置Xdebug 开启Debug模式 打断点 浏览器访问该项目地址:http://wiot.frp.tinywan.top/

  4. 提升开发幸福感的10条JS技巧

    鱼头总结一些能够提高开发效率的JS技巧,这些技巧很实用,觉得挺好,想推荐给大家,所以有了这篇文章. 生成随机UID const genUid = () => {  var length = 20 ...

  5. Oracle的“ORA-00937: 不是单组分组函数” 如何解决?

    之前在编写oracle的sql语句时遇到这个问题,这里做个记录 问题描述:ORA-00937: 不是单组分组函数 问题原因:select语句中又在查询某一列的值,其中还有聚合函数 原先本人编写SQL是 ...

  6. redis创建集群至少需要几个节点?至少需要几个master节点?

    描述: 这也算个思考吧,通过redis-trib.rb可创建redis集群,然后通过--replicas后面接的数字,表示1个主节点对应几个从节点,那么我就做了如下的测试,想要达到的效果就是有6个节点 ...

  7. SpringBoot Aop打印参数

    import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; import lombok.extern.slf ...

  8. python while 1 然后pass会发生什么?

    下面的代码,会使32核linux服务器志强e5的cpu使用率达到3200%,然后别的什么程序都跑不了. 如果windows,cpu使用率会达到100%.这是计算方式有点区别. 个人计算机,除非你是8路 ...

  9. pycharm安装、首次使用及汉化

    摘自:https://blog.csdn.net/qq_30463497/article/details/84992480 一.下载pycharm安装包打开PyCharm的官方下载地址:http:// ...

  10. Web自动化遇到shadowDOM节点操作(还没试)

    近期有同学在做web自动化的时候,发现页面上有些元素,在selenium中无法通过xpath来定位,各种原因找了半天,都没找到解决方案. 最后发现元素在一个叫做shadow-root的节点下面. 如下 ...