Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class Library Package : sl5 target issue

I'm trying to create a shared library project containing some POCO classes used to serialize data among multiple clients (WPF / SL5 / Asp.Net).

Before Asp.Net vNext, I was using PCL without problem. Now MVC 6 is there, I tried to add Asp.Net Core 5 target to the PCL, but it seems impossible :

PCL impossible

I guess the corresponding PCL profile doesn't exists yet, so I tried to create a "Class Library Package" and add the SL5 target

  "frameworks": {
      "dotnet": { },
      "dnx46": { },
      "dnxcore50": { },
      "sl5": { }
    }

but unfortunately, even if the target is added to the Reference tree without any error, it fails at compilation :

Where is System ?

with errors like :

Error CS0518 : Predefined type 'System.Object' is not defined or imported   
Error CS0246 : The type or namespace name 'String' could not be found (are you missing a using directive or an assembly reference?)

Like if 'Micorosft.CSharp' wasn't present for 'sl5' target... I cannot add 'mscorlib' to "sl5" dependencies, and even adding BCL doesn't helps. I'm lost.

What am I missing ?

like image 609
rducom Avatar asked Oct 31 '22 19:10

rducom


1 Answers

Silverlight isn't supported by DNX projects. See the bug here https://github.com/aspnet/dnx/issues/1837

like image 154
davidfowl Avatar answered Nov 13 '22 06:11

davidfowl