docker学习之路-build asp.net core 2.2产生 warning MSB3245: Could not resolve this reference.错误的解决办法
在docker build的时候有时我们可以直接使用dotnet publish来发布,但是如果用docker构建镜像的时候却会出现下面的错误:

解决办法:https://stackoverflow.com/questions/14261412/could-not-resolve-this-reference-could-not-locate-the-assembly
答案的原文如下:You most likely get this message when the project points to an old location of the assembly where it no longer exists. Since you were able to build it once, the assembly has already been copied into your bin\Debug / bin\Release folders so your project can still find a copy.
If you open the references node of the project in your solution explorer, there should be a yellow icon next to the reference. Remove the reference and add it again from the correct location.
If you want to know the location it was referenced from, you'd have to open the .csproj file in a text editor and look for the HintPath for that assembly - the IDE for some reason does not show this information.
大意就是在.cspj文件中有一个黄线标志的警告,将那个黄线标志的警告的行删除了之后(就是将某一个包引用删除了),再重新引用一下这个包即可,那我上面贴图的例子来说,Microsoft.AspNetCOre.Http.Abstractions这个包有问题,所以我就将他删除了然后重新在nuget下载一下,问题就解决了。
docker学习之路-build asp.net core 2.2产生 warning MSB3245: Could not resolve this reference.错误的解决办法的更多相关文章
- docker build 错误 /usr/share/dotnet/sdk/2.1.801/Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference
docker dotnet Restore 的时候报错, 一度怀疑是linux的dotnet core sdk没有装好, 卸了装, 装了卸, 试了好几遍还是无效(Microsoft.Common.Cu ...
- ASP.Net WebAPI HttpDelete/PUT方法运行或发布到生产服务器上后出现405(Method Not Allowed)错误的解决办法
原文:ASP.Net WebAPI HttpDelete/PUT方法运行或发布到生产服务器上后出现405(Method Not Allowed)错误的解决办法 本文只是个人的理解和学习记录,如果觉得本 ...
- ASP.NET MVC 3 loginUrl自动变成Account/Login,并且发生404错误的解决方法
http://www.cnblogs.com/think8848/archive/2011/07/08/2100814.html ASP.NET MVC 3 loginUrl自动变成Account/L ...
- Asp.Net保存session的三种方法 (Dll文件更新导致session丢失的解决办法)
1. InProc模式(默认值):asp.net将session保存到当前进程中,这种方式最快,但是不能多台服务器共享session,且会话状态数据容易丢失. <sessionState mod ...
- Docker Hadoop 配置常见错误及解决办法
Docker Hadoop 配置常见错误及解决办法 问题1:wordcount运行卡住,hadoop 任务运行到running job就卡住了 INFO mapreduce.Job: Running ...
- 使用 Docker 在 Linux 上托管 ASP.NET Core 应用程序
说在前面 在阅读本文之前,您必须对 Docker 的中涉及的基本概念以及常见命令有一定了解,本文侧重实战,不会对相关概念详述. 同时请确保您本地开发机器已完成如下安装: Docker 18.06 或更 ...
- docker学习之路-centos下安装docker
前言 我要在云服务器上做一个asp.net core的webapi应用,使用docker来部署应用,中间用到的任何组件包括nginx和sqlserver 2017都是用docker来装载运行,所以,这 ...
- ASP.NET Core 学习笔记 第一篇 ASP.NET Core初探
前言 因为工作原因博客断断续续更新,其实在很早以前就有想法做一套关于ASP.NET CORE整体学习度路线,整体来说国内的环境的.NET生态环境还是相对比较严峻的,但是干一行爱一行,还是希望更多人加入 ...
- 坎坷路:ASP.NET Core 1.0 Identity 身份验证(中集)
上一篇:<坎坷路:ASP.NET 5 Identity 身份验证(上集)> ASP.NET Core 1.0 什么鬼?它是 ASP.NET vNext,也是 ASP.NET 5,以后也可能 ...
随机推荐
- springboot中配置urlrewrite实现url伪静态强化网站seo
关于urlrewrite urlrewrite使用强大的自定义规则来使用用户更容易记住.搜索引擎更容易找到的URL(对于seo比较重要).通过使用规则模板.重写映射,Web管理员可以轻松地设置规则,根 ...
- SpringBoot配置多注册中心(yml,properties)
dubbo-2.6.6 dubbo.config.multiple=true dubbo.registries.z1.timeout = 5000 dubbo.registries.z1. ...
- python应用之socket编程
tcp/udp下的socket的基本使用 基于tcp的socket Tcp是基于链接的,必须先启动服务端,然后启动客户端进行链接 服务端: ss = socket() #创建服务器套接字 ss.bin ...
- Listary 文件操作神器
文档简介 Listary 官方文档(中文版):https://zhuanlan.zhihu.com/p/24897629 视频介绍:https://v.youku.com/v_show/id_XNTY ...
- 各类app的小结
各类app小结: 一.原生app: 二.webapp: 无法调用底层设备的api 三.混合app的方法: 1.原生app 嵌入 2.flutter 3.react native 4.AppCan( ...
- 这里有一个url=https://www/.baidu.com/s?id=111&name=yourname,写一个函数获取query的参数和值存放在一个对象
console.log(getJson(url)); function getJson(url){ var obj={}; var arr=url.split("?")[1].sp ...
- vue+element 表格筛选
筛选是element 组件 自己有的东西,按照文档撸 是没有问题 这里存在一个情况是,如果 筛选 的数据没有 那么整个表格为空白,产品要加提示 例如:暂无筛选的数据 解决方案:通过 ref 获取整 ...
- Git-push和pull分支
查看分支信息:git branch -r 查看所有分支信息:git branch -a 本地推送分支:git push origin branch-name 推送分支前最好先pull分支:git pu ...
- Shell脚本之三 传递参数
我们可以在执行 Shell 脚本时,向脚本传递参数,脚本内获取参数的格式为:$n.n 代表一个数字,1 为执行脚本的第一个参数,2 为执行脚本的第二个参数,以此类推-- 实例 向脚本传递三个参数,并分 ...
- hread.interrupt()到底意味着什么
首先,一个线程不应该由其他线程来强制中断或停止,而是应该由线程自己自行停止. 所以,Thread.stop, Thread.suspend, Thread.resume 都已经被废弃了.而 Threa ...