asp.netsilverlight-5.0portable-class-library.net-core

Why is ASP.NET Core 5.0 incompatible with Silverlight 5 for Portable Class Libraries?


In a portable class library, you can select multiple platforms to target. I don't understand why ASP.NET Core 5.0 doesn't seem to share any API surface with Silverlight 5, yet it does with Windows 10, .NET Framework 4.6, Xamarin, etc.

Is this just a situation where the profile was not created? Or, is it just that the shared surface API hasn't been made portable? Or, do the two platforms really not share any APIs?


Solution

  • I don't understand why ASP.NET Core 5.0 doesn't seem to share any API surface with Silverlight 5

    It boils down to the target CLR/.Net version which you want Asp.Net to sit upon, and whether specific portable libraries were made to target Silverlight's CLR. The choice for Asp.net is to target either Core 5 or .Net 4.6 and only one has portable libraries to Silverlight; not both can be targetted.

    From top to bottom, Core 5, uses specific .Net Core libraries which sit upon the Core CLR and those libraries are not the same as the .Net 4.6 libraries which utilize the standard CLR. Specific portable libraries have to be made for each target implementation. (Remember also that Silverlight has its own CLR...its getting complicated right?)

    Long story short, most likely there will not (and more important has not) be a bridge built to the Silverlight CLR to share portable libraries of the .Net 5 core libraries like the .Net 4.X libraries; hence one doesn't have that option.


    References