在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下载一下,问题就解决了。

最新文章

  1. ORACLE表空间管理维护
  2. 响应式字体(js控制)
  3. springboot中swaggerUI的使用
  4. StoryBoard解惑
  5. MYSQL 的错误Incorrect information in file: '.\test\stuff.frm
  6. Linux(CentOS)常用操作指令(二)
  7. C#的GC机制(来自网摘复制,未整理)
  8. 配置Log4j(很详细)
  9. 查看Nginx、apache、MySQL和PHP的编译参数
  10. Sponsored Feature: Common Performance Issues in Game Programming
  11. Orchard 源码探索(Module,Theme,Core扩展加载概述)
  12. Zepto源码分析-架构
  13. ASP.NET中登录时记住用户名和密码(附源码下载)--ASP.NET
  14. SparkSteaming运行流程分析以及CheckPoint操作
  15. EDKII Build Process:EDKII项目源码的配置、编译流程[三]
  16. Visual Studio 2017 密匙
  17. python入门(十四):面向对象(属性、方法、继承、多继承)
  18. mysql 判断某字段是否包含中文
  19. QQ浏览器兼容模式问题
  20. BZOJ.3585.mex(线段树)

热门文章

  1. MySQL的select详细介绍
  2. ARM64编译工具链下载
  3. 201871010117-石欣钰《面向对象程序设计(java)》第二周学习总结
  4. 201671030103 实验十四 团队项目评审&课程学习总结
  5. 20180610模拟赛T1——脱离地牢
  6. 【笔试题】python文件操作
  7. django-debug-toolbar调试请求接口
  8. Oracle客户端和服务端菜单区别
  9. eclipse中自动生成serialVersionUID
  10. uname 命令简介