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. [BUAA 软工]提问回顾与个人总结

    项目 内容 这个作业属于哪个课程 北航软工 这个作业的要求在哪里 提问回顾与个人总结 我在这个课程的目标是 学习如何以团队的形式开发软件,提升个人软件开发能力 这个作业在哪个具体方面帮助我实现目标 督 ...

  2. idea2017显示maven Project菜单

    右侧就出现 maven project菜单了.

  3. Android相关视频

    Android架构师 层次分析 –从顶层到底层 洞察其原理https://www.bilibili.com/video/av59066641?t=132安卓/Android 逆向破解系统班 第2期 全 ...

  4. scrapy爬虫案例:用MongoDB保存数据

    用Pymongo保存数据 爬取豆瓣电影top250movie.douban.com/top250的电影数据,并保存在MongoDB中. items.py class DoubanspiderItem( ...

  5. 【转载】 tf.cond() ----------------------(tensorflow 条件判断语句 if.......else....... )

    原文地址: https://cloud.tencent.com/developer/article/1486441 ------------------------------------------ ...

  6. fatal error: linux/videodev.h: No such file or directory

    Run Build Command:"/usr/bin/make" "cmTC_162a3/fast"/usr/bin/make -f CMakeFiles/c ...

  7. PHPExcel 导出数据(xls或xlsx)- 助手类(函数)

    本文链接:https://www.cnblogs.com/tujia/p/11358096.html 说明:简单好用的导出助手,轻松导出数据到 excel !! 使用示例: Example: Exce ...

  8. [PHP] dompdf 使用记录

    # 安装字体,解决中文乱码参考: https://blog.51cto.com/lampzxr/1916038```首先下载composer curl -sS https://getcomposer. ...

  9. UE4 Animation]IK Related

    转自:https://dawnarc.com/2018/05/ue4animationik-related/ Examples 工程1 在油管上看到一个UE4 IK动画的demo工程示例 该示例作者的 ...

  10. MTCNN代码解读

    代码基于bm1682芯片 #include "mtcnn.hpp" #include "utils.hpp" using namespace std; usin ...