简体   繁体   English

在Silverlight 5中使用.Net标准程序集

[英]Using .Net standard assemblies in Silverlight 5

Can or will .Net Core assemblies build using the .Net standard be compatible with Silverlight 5? 使用.Net标准构建的.Net Core程序集能否或将与Silverlight 5兼容?

Ideally binary compatible but a re-compile is fine also. 理想情况下二进制兼容,但重新编译也可以。 And if they are, is there any documentation on how to create such assemblies? 如果是的话,是否有任何有关如何创建此类程序集的文档?

I could not find anything about Silverlight in the documentation at eg .Net Standard Documentation 我在.Net标准文档等文档中找不到有关Silverlight的任何信息

The only way to reference the same DLL from both Silverlight and .Net is to use a Portable Class Library (PCL) . 从Silverlight和.Net引用同一DLL的唯一方法是使用可移植类库(PCL) Since PCL's have to be cross-platform, and the technology predates .Net Standard you will be pretty limited in what you can do in a PCL (more limited than what you can do in Silverlight). 由于PCL必须是跨平台的,并且该技术早于.Net Standard,所以您在PCL中可以做的工作将受到很大的限制(比在Silverlight中可以做的更多)。

Since Silverlight is already on the path to being sunsetted , there will be no new features for the technology. 由于Silverlight已经在被淘汰 ,因此该技术将没有新功能。 Only bug fixes and security patches until October 2021. Silverlight's compatibility has been shrinking since the announcement, and all modern browsers have dropped support (or never had it). 自公告发布以来,只有错误修复和安全补丁才发布,直到2021年10月为止。Silverlight的兼容性自发布以来一直在缩小,并且所有现代浏览器都放弃了支持 (或从未提供支持 )。

The list of browsers that do not support Silverlight include: 不支持Silverlight的浏览器列表包括:

  • Firefox since version 52.0 从52.0版开始的Firefox
  • Chrome since they disabled NPAPI support Chrome,因为他们禁用了NPAPI支持
  • Safari since ersion 9.x 自版本9.x起的Safari
  • Microsoft Edge (never added support) Microsoft Edge(从不添加支持)

All have also disabled flash support as well. 所有人也都禁用了闪存支持。 The only browser that still supports Silverlight is Internet Explorer. 唯一仍支持Silverlight的浏览器是Internet Explorer。

Since there are 3 years left (as of 2018) till Silverlight will be completely dead, I would recommend migrating away from it and using standards based HTML5/CSS3/JavaScript6 solutions. 由于距Silverlight完全死亡还有3年(截至2018年),我建议您从此迁移并使用基于标准的HTML5 / CSS3 / JavaScript6解决方案。

No. Only Silverlight what is supported (on .Net Standard 1.0) is Windows Phone Silverlight 8.0. 否。WindowsPhone Silverlight 8.0仅支持(在.Net Standard 1.0上)Silverlight。 More information https://github.com/dotnet/standard/blob/master/docs/versions.md 更多信息https://github.com/dotnet/standard/blob/master/docs/versions.md

Thread is kinda old, but if you're still looking for a Silverlight app migration, you might want to take a look at this : http://www.cshtml5.com 线程有点旧,但是如果您仍在寻找Silverlight应用程序迁移,则可能需要看一下: http : //www.cshtml5.com

It allows you to keep the existing C# and XAML code, and compile the files to HTML5 and JavaScript. 它允许您保留现有的C#和XAML代码,并将文件编译为HTML5和JavaScript。

They also have a guide dedicated to SL migration : http://www.cshtml5.com/links/migrating-from-silverlight.aspx 他们也有专门针对SL迁移的指南: http : //www.cshtml5.com/links/migrating-from-silverlight.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM