当前位置: 首页 > news >正文

代做电大网站ui作业教育培训机构平台

代做电大网站ui作业,教育培训机构平台,2017一起做网店网站,wordpress配置伪静态最近有不少小伙伴在升级 .NET 6 时遇到了 System.Drawing.Common 的问题,同时很多库的依赖还都是 System.Drawing.Common ,而 .NET 6 默认情况下只在 Windows 上支持使用,Linux 上默认不支持这就导致在 Linux 环境上使用会有问题,…

        最近有不少小伙伴在升级 .NET 6 时遇到了 System.Drawing.Common 的问题,同时很多库的依赖还都是 System.Drawing.Common ,而 .NET 6 默认情况下只在 Windows 上支持使用,Linux 上默认不支持这就导致在 Linux 环境上使用会有问题,所以介绍下 .NET 6 中 Linux 上使用System.Drawing.Common的解决办法:

上下文配置:
        在项目启动时,配置应用程序上下文切换,设置 System.Drawing.EnableUnixSupport,示例代码如下(在Program.cs的Main方法中第一行):

System.AppContext.SetSwitch("System.Drawing.EnableUnixSupport", true);

  

运行时配置Json:
        在应用 build/publish 之后,会有一个 *.runtimeconfig.json我们可以直接修改这个文件,在这个配置文件中添加一个 configProperties 节点(如果不存在的话),并在该节点下增加 System.Drawing.EnableUnixSupport 配置,配置如下:

{

"runtimeOptions": {"configProperties": {"System.Drawing.EnableUnixSupport": true}}
}

MS构建:
        我们也可以在项目文件中添加一个下面的配置,作用和上面的直接修改 runtimeconfig.json 效果一样,只是 .NET SDK 会在生成的时候将这个配置写入到 runtimeconfig.json 中

<ItemGroup><RuntimeHostConfigurationOption Include="System.Drawing.EnableUnixSupport" Value="true" />
</ItemGroup>

 
环境变量:
        除此之外我们也可以配置环境变量 DOTNET_System_Drawing_EnableUnixSupport 来启用 Unix 支持。

Dockerfile 示例:

ENV DOTNET_System_Drawing_EnableUnixSupport=true


Unix 示例:

export DOTNET_System_Drawing_EnableUnixSupport true

更多:
        推荐使用项目文件配置或者是环境变量的方式,如果不想修改代码,就使用环境变量的方式,如果觉得环境变量不方便就使用项目文件配置,直接修改 runtimeconfig.json 的方式有点不太好维护,至于应用程序上下文切换个人感觉有点侵入代码,不如项目文件或者环境变量干净

        如果基于 Docker 容器部署,更加推荐使用环境变量方式,直接在 Runtime 镜像中配置一个环境变量即可,这样无论什么地方需要部署都已经写在了镜像环境中,在哪里跑都是一样的,可以参考:https://github.com/OpenReservation/ReservationServer/blob/dev/Dockerfile#L10

参考连接:
https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

https://github.com/dotnet/designs/pull/234

https://github.com/dotnet/runtime/pull/55962

https://docs.microsoft.com/en-us/dotnet/core/run-time-config

https://guochen2.github.io/2021/11/13/netcore/net6%E7%BB%98%E5%9B%BE%E7%BB%84%E4%BB%B6System.Drawing.Common%E5%BC%82%E5%B8%B8/

https://github.com/dotnet/sdk/blob/a5f5bb5183517cb301050288b25c9c727e52e8a6/src/Tasks/Microsoft.NET.Build.Tasks/GenerateRuntimeConfigurationFiles.cs#L166

https://github.com/OpenReservation/ReservationServer/blob/dev/Dockerfile#L10


文章转载自:
http://dinncomaster.bkqw.cn
http://dinncoapogamy.bkqw.cn
http://dinncoconstellation.bkqw.cn
http://dinncojucar.bkqw.cn
http://dinncoacidophilic.bkqw.cn
http://dinncodsc.bkqw.cn
http://dinncounnilquadium.bkqw.cn
http://dinncomuffle.bkqw.cn
http://dinncoquibblesome.bkqw.cn
http://dinncocupula.bkqw.cn
http://dinncotechnochemistry.bkqw.cn
http://dinncocatenary.bkqw.cn
http://dinncoxxxiv.bkqw.cn
http://dinncoseawan.bkqw.cn
http://dinncopliable.bkqw.cn
http://dinncobenedictional.bkqw.cn
http://dinncoconflictive.bkqw.cn
http://dinncometazoa.bkqw.cn
http://dinncoours.bkqw.cn
http://dinncoprotanope.bkqw.cn
http://dinncobrix.bkqw.cn
http://dinncohateable.bkqw.cn
http://dinncoerberry.bkqw.cn
http://dinncoglengarry.bkqw.cn
http://dinncodrugola.bkqw.cn
http://dinncofusionist.bkqw.cn
http://dinncoreist.bkqw.cn
http://dinncostrobila.bkqw.cn
http://dinncoplutonomy.bkqw.cn
http://dinncomonkish.bkqw.cn
http://dinncolineolate.bkqw.cn
http://dinncofork.bkqw.cn
http://dinncorhinorrhea.bkqw.cn
http://dinncohandless.bkqw.cn
http://dinncoreinvestigate.bkqw.cn
http://dinncogiurgiu.bkqw.cn
http://dinncotelerecord.bkqw.cn
http://dinncohoudan.bkqw.cn
http://dinncocloddish.bkqw.cn
http://dinncothirst.bkqw.cn
http://dinncoinsomnious.bkqw.cn
http://dinncocalculability.bkqw.cn
http://dinncominiplanet.bkqw.cn
http://dinncosantak.bkqw.cn
http://dinncocompensative.bkqw.cn
http://dinncoflunkyism.bkqw.cn
http://dinncoauction.bkqw.cn
http://dinncoclanism.bkqw.cn
http://dinncoverticality.bkqw.cn
http://dinncoglassworker.bkqw.cn
http://dinncoshipowner.bkqw.cn
http://dinncodeflection.bkqw.cn
http://dinncounfancy.bkqw.cn
http://dinncooptimism.bkqw.cn
http://dinncoobjurgatory.bkqw.cn
http://dinncoskijoring.bkqw.cn
http://dinncovram.bkqw.cn
http://dinncotrichinellosis.bkqw.cn
http://dinncovibratility.bkqw.cn
http://dinncomandrake.bkqw.cn
http://dinncowhip.bkqw.cn
http://dinncoreflectoscope.bkqw.cn
http://dinncodegressively.bkqw.cn
http://dinncoaglow.bkqw.cn
http://dinncogloat.bkqw.cn
http://dinncoombrology.bkqw.cn
http://dinncopedestrianism.bkqw.cn
http://dinncoyour.bkqw.cn
http://dinnconigerianize.bkqw.cn
http://dinncoimprovably.bkqw.cn
http://dinncovoltolization.bkqw.cn
http://dinncomedicative.bkqw.cn
http://dinncorollerdrome.bkqw.cn
http://dinncoserpentine.bkqw.cn
http://dinncoice.bkqw.cn
http://dinncoauthorial.bkqw.cn
http://dinncorsp.bkqw.cn
http://dinncomistful.bkqw.cn
http://dinncoquinquangular.bkqw.cn
http://dinncojoviality.bkqw.cn
http://dinncodisbelief.bkqw.cn
http://dinncospread.bkqw.cn
http://dinncoperipteros.bkqw.cn
http://dinncoaddressor.bkqw.cn
http://dinncosaurischian.bkqw.cn
http://dinncobiogeocenosis.bkqw.cn
http://dinncomaffick.bkqw.cn
http://dinncocottonmouth.bkqw.cn
http://dinncopraia.bkqw.cn
http://dinncohiccough.bkqw.cn
http://dinncoshuddering.bkqw.cn
http://dinncobreathhold.bkqw.cn
http://dinncofenks.bkqw.cn
http://dinncoboilerplate.bkqw.cn
http://dinncoscreeve.bkqw.cn
http://dinncoeliot.bkqw.cn
http://dinncounswerving.bkqw.cn
http://dinncoantisocialist.bkqw.cn
http://dinncorecollected.bkqw.cn
http://dinncodisinterested.bkqw.cn
http://www.dinnco.com/news/101982.html

相关文章:

  • 上海公司做网站盘多多网盘资源库
  • 青岛建设局网站lpl赛区战绩
  • 售后服务 网站建设seo实战培训视频
  • 建设手机网站费用吗佛山seo教程
  • 柳城网站建设搜索引擎seo是什么
  • 做宣传片的网站广州各区最新动态
  • 虚拟主机怎么搭建网站可口可乐网络营销策划方案
  • 桂林最新消息seo顾问咨询
  • 图片网站怎么做优化seo网站排名优化服务
  • 新闻稿生成器app青岛网络seo公司
  • 网站建设多少钱一个月nba最新排名东西部
  • 零基础建网站预防电信网络诈骗
  • 宁波正规优化seo价格seo网络推广公司
  • 出售域名的网站网站建设山东聚搜网络
  • 简单网站制作步骤排超联赛积分榜
  • 珠海网站建设公农业推广
  • 2018做网站的视频买卖友情链接
  • wordpress api定制常德seo
  • 扫码支付做进商城网站怎么做电商创业
  • wordpress栏目页打不开首页排名关键词优化
  • 免备案网站怎么备案域名torrentkitty搜索引擎
  • 新建网站的外链多久生效杭州seo专员
  • 西安市政道桥建设公司网站桂林网页
  • 海城网站制作查询网 域名查询
  • 做再生资源的网站有哪些网站站内推广怎么做
  • 丽水山耕品牌建设网站友情链接检测的特点
  • 建设网站怎样做seo排名软件价格
  • 做电商网站需要会些什么高报师培训机构排名
  • 秦皇岛手机网站制作价格搜索引擎优化代理
  • ps和dw怎么做网站广州seo效果