I am looking for Windows Runtime types, such as Frameor Button, from the .NET Core library. It seemed to work fine when I used the traditional PCL designed for Windows / Windows Phone 8.1. For some reason, however, it does not compile after I switched my project to DNX.
Here is my project.json:
{
"frameworks": {
".NETPortable,Version=v4.6,Profile=Profile32": { }
}
}
And here is my sample code:
using System.Linq;
using Windows.UI.Xaml.Controls;
public class Sample
{
public void Method()
{
Enumerable.Empty<Frame>();
}
}
I was getting a compiler error on Framein this snippet saying that the type was not found. So, I did a little detective work on this and hit F12 on this in my regular PCL to look at its declaring assembly.
, Windows Runtime Windows.winmd, - Program Files. , .NET Core?
!
( , PCL, , .NET Core.)
meta:. , asp.net-core , DNX.
: :
".NETPortable,Version=v4.6,Profile=Profile32": {
"frameworkAssemblies": {
"Windows": { "type": "build" }
}
}
, , , , , System.Linq System.Runtime.