当前位置: 移动技术网 > IT编程>开发语言>.net > ASP.NET Core 共享第三方依赖库部署的Bug(*.deps.json on 2.2.0 or 4.6.0 版本)

ASP.NET Core 共享第三方依赖库部署的Bug(*.deps.json on 2.2.0 or 4.6.0 版本)

2019年03月28日  | 移动技术网IT编程  | 我要评论
之前花了很长的一段时间研究之后,以便把(第三方或)系统的和应用的dll分开,最后还写了一篇文章介绍,木有想到,今天又入坑了,发现了一个bug。 ...

背景:

i try to put the microsoft.*.dll and system.*.dll togather to a new folder.
以便把(第三方或)系统的和应用的dll分开。
之前花了很长的一段时间研究之后,最后:
i find xxx.deps.json can make it work.

之后我还特意写了篇文章介绍它:

今天遇bug了:

but today,when i update the microsoft. aspnetcore to 2.2.0 version.

之前框架引用的是全家桶microsoft.aspnetcore.all,感觉发布的时候,多了太多没用的dll。

所以为了瘦身,只挑几个必要的,然后升级了一下版本,毕竟听说netcore新版本性能更强了。

只是没想到啊。

it dose not work, and make me crazy.

because it always show me the msg like this:

f:\code\opensource\aries-github\trunk\aries.devframework\web.ui_netcore\bin\rele ase\publishoutput>dotnet web.ui.dll error: **an assembly specified in the application dependencies manifest (web.ui.deps.js on) was not found**: package: 'microsoft.aspnetcore.authentication.abstractions', version: '2.2.0 ' path: 'lib/netstandard2.0/microsoft.aspnetcore.authentication.abstractions.d ll'

and the json like this:

"microsoft.aspnetcore.authentication.abstractions/2.2.0": {
        "dependencies": {
          "microsoft.aspnetcore.http.abstractions": "2.2.0",
          "microsoft.extensions.logging.abstractions": "2.2.0",
          "microsoft.extensions.options": "2.2.0"
        },
        "runtime": {
          "lib/netstandard2.0/microsoft.aspnetcore.authentication.abstractions.dll": {
            "fileversion": "2.2.0.18316"
          }
        }
      }

 

我花了n长的时间在检测配置和确定路径的正确性,不管是相对的,还是绝对的;

在服务器上,在本地上,但结果,却依旧很悲催。

甚至,我上一篇中指向把源码都下到本地了,搜了半天关键字,也没啥发现。
it take me much time to find out the question what it's.

发现bug:

when i try to maike it like this:
microsoft.aspnetcore.authentication.abstractions
microsoft.aspnetcore.authentication.abstractions/2.2.xxx
it work.
就是这样,只要版本号不是2.2.0,它就一切正常。
之后又几次测试,发现版本号是4.6.0也同样有问题。
and then i find the version on /4.6.0 ,it does not work also.

就是这样,版本号三位数,尾数是0的,就提示找不到dll。

how ugly this bug it's.

解决方法:

过点时间再升一下版本,只要尾号不是以0为结尾就好,像之前一直用2.0.3版本,就很好。

或者,把版本号替换掉。

github上也留言了,小小问题,但愿早日修复:

最后,祝大伙玩netcore玩的快乐。

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网