[英]Deployment of .NET Standard assembly (Microsoft.AspNetCore.SignalR.Client) in 4.6.2 Framework
There does not seem to be any particular guidance on what needs to be deployed when consuming a .net standard 2.0 package into the 4.6.2 framework build.关于在 4.6.2 框架构建中使用 .net 标准 2.0 package 时需要部署什么似乎没有任何特定的指导。
We have a large 4.6.2 project that has one assembly using Microsoft.AspNetCore.SignalR.Client via nuget package.我们有一个大型 4.6.2 项目,它有一个使用 Microsoft.AspNetCore.SignalR.Client 的程序集,通过 nuget package。 This ends up bringing in netstandard 2.0 and it's huge pile of assemblies to our output folder (100+ assemblies) but the automatic binding redirects written to the config file only list about 64 of them.
这最终带来了 netstandard 2.0 和大量程序集到我们的 output 文件夹(100 多个程序集),但写入配置文件的自动绑定重定向仅列出了其中的 64 个。
My question is do I only need to deploy the ones listed in the.config file tagged with bindingRedirect or do you just deploy all of the extra "shim" assemblies?我的问题是我只需要部署标记为 bindingRedirect 的 .config 文件中列出的那些,还是只部署所有额外的“shim”程序集?
The solution for me was to build my project with SignalR using the 4.6.2 framework, you must use Package Reference for the SignalR nuget package and you must use Project Settings | The solution for me was to build my project with SignalR using the 4.6.2 framework, you must use Package Reference for the SignalR nuget package and you must use Project Settings | Auto-Generate Binding Redirects.
自动生成绑定重定向。 Your output directory will contain the binding redirects needed to run the application.
您的 output 目录将包含运行应用程序所需的绑定重定向。 The *.exe.config will have the redirects written out for you (that's nice) but you will find that almost the entire framework gets redirected, feels more like an in-place upgrade using binding redirects.
*.exe.config 将为您写出重定向(这很好),但您会发现几乎整个框架都被重定向,感觉更像是使用绑定重定向的就地升级。 The code is in production and working well.
该代码正在生产中并且运行良好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.