You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 13, 2022. It is now read-only.
I have a PCL targeting .NET Framework 4.6 & UWP 10.0.10240 that I'm trying to convert to .NET Standard. It is actually used to share code that uses some UWP APIs that are available on desktop as well. I currently have these references in the project file:
Based on the target frameworks, I figured that my desired version of .NET Standard would be 1.3. However I'm getting compilation errors about missing mscorlib whenever I use any of the UWP APIs.
usingWindows.Storage;classC{voidM(){varfolder=KnownFolders.PicturesLibrary;// error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.}}
I noticed that if I target netstandard2.0 instead, the compilation succeeds. But since I'm trying to target all versions of UWP, I can't afford that. Is it impossible to use these APIs from 1.3? Are PCLs the only option? Thank you (Sorry if this is not the appropriate repo)
I have a PCL targeting .NET Framework 4.6 & UWP 10.0.10240 that I'm trying to convert to .NET Standard. It is actually used to share code that uses some UWP APIs that are available on desktop as well. I currently have these references in the project file:
Based on the target frameworks, I figured that my desired version of .NET Standard would be 1.3. However I'm getting compilation errors about missing mscorlib whenever I use any of the UWP APIs.
This is the new csproj:
and a small example:
I noticed that if I target
netstandard2.0instead, the compilation succeeds. But since I'm trying to target all versions of UWP, I can't afford that. Is it impossible to use these APIs from 1.3? Are PCLs the only option? Thank you (Sorry if this is not the appropriate repo)