locked
Is a UWA a .NET Core Application? RRS feed

  • Question

  • Hi,

    in my Universal Windows Application (UWA) there is a reference to the called "Microsoft.NETCore.UniversalWindowsPlatform"

    What is this reference for?

    Is every UWA a .NET Core-Application?

    Regards,
    Markus

    Thursday, March 16, 2017 6:40 PM

Answers

  • Hello Markus,
    From here: https://msdn.microsoft.com/en-us/magazine/mt590967.aspx
    Notice:
    UWP apps take advantage of the new Microsoft .NET Core Framework (explained in detail later in this article). Your .NET business logic can run on other platforms that support .NET Core, such as ASP.NET 5. UWP apps deploy a small copy of the .NET Core with the app, so the app will always run against the .NET version you tested it against. All .NET UWP apps take full advantage of .NET Native, which generates highly optimized native machine code, resulting in performance gains (also explained in this article).

    Notice above, only .NET UWP apps use .NET Core.

    There's more info here:
    https://msdn.microsoft.com/en-us/library/mt185501.aspx

     

    Best Regards, -David Hollowell



    Thursday, March 16, 2017 10:45 PM

All replies

  • Hello Markus,
    From here: https://msdn.microsoft.com/en-us/magazine/mt590967.aspx
    Notice:
    UWP apps take advantage of the new Microsoft .NET Core Framework (explained in detail later in this article). Your .NET business logic can run on other platforms that support .NET Core, such as ASP.NET 5. UWP apps deploy a small copy of the .NET Core with the app, so the app will always run against the .NET version you tested it against. All .NET UWP apps take full advantage of .NET Native, which generates highly optimized native machine code, resulting in performance gains (also explained in this article).

    Notice above, only .NET UWP apps use .NET Core.

    There's more info here:
    https://msdn.microsoft.com/en-us/library/mt185501.aspx

     

    Best Regards, -David Hollowell



    Thursday, March 16, 2017 10:45 PM
  • Thank you!

    But in this case I have another question:

    If a UWP App is a .NET-Core-Application and the .NET-Core-Framework supports Linux,
    therefore a UWP App should be able to run on Linux. But I am pretty sure that this is not the case, but why?

    Regards,
    Markus 

    Friday, March 17, 2017 9:30 AM
  • The Universal Windows Platform, UWP, provides a common app platform available on every device that runs Windows 10.

    .Net Core is used to create libraries for cross-platform development. It actively hurts the ecosystem if basic components like collections need to be implemented multiple times. The goal of .NET Core is having a single code base that can be used to build and support all the platforms, including Windows, Linux and Mac OSX.

    You can utilize .NET Core portable class libraries (PCLs) to target any UWP app, .NET 4.6 app or ASP.NET 5 app—even those that are cross-platform.

     

    To summarize, .NET Core is able to run cross-platform and allows you to develop PCLs which also run cross-platform. UWP apps re-use the cross platform libraries, but it's a platform to build Windows 10 specific applications which can target different device families such as mobile, tablet, PC, and Xbox.

    Resources:

    https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide

    https://msdn.microsoft.com/en-us/magazine/mt590967.aspx

    https://blogs.msdn.microsoft.com/dotnet/2014/12/04/introducing-net-core/


    David Hollowell

    Friday, March 17, 2017 11:21 PM
  • The Universal Windows Platform, UWP, provides a common app platform available on every device that runs Windows 10.

    .Net Core is used to create libraries for cross-platform development. It actively hurts the ecosystem if basic components like collections need to be implemented multiple times. The goal of .NET Core is having a single code base that can be used to build and support all the platforms, including Windows, Linux and Mac OSX.

    You can utilize .NET Core portable class libraries (PCLs) to target any UWP app, .NET 4.6 app or ASP.NET 5 app—even those that are cross-platform.

     

    To summarize, .NET Core is able to run cross-platform and allows you to develop PCLs which also run cross-platform. UWP apps re-use the cross platform libraries, but it's a platform to build Windows 10 specific applications which can target different device families such as mobile, tablet, PC, and Xbox.

    Resources:


    David Hollowell

    Hi,

    I'm getting more and more confused reading into .Net Core and UWP topic.

    You are saying I can create a .NET Core Library project and reference it in my UWP app, correct? Which version of .NET Core will that be? The newest version of .Net Core is 2.0 at this time. So according to above information I can create a .Net Core 2.0 project and reference it from UWP. This fails with "Unable to add a reference to project" in VS2017.

    The only guide to create the mentioned ".Net Core Portable Class Library" changed the project type halfway to a .Net Standard project. This is however something else entirely! UWP supports .Net Standard 1.4 according to .Net Standard version table, however .Net Core 1.0 supports .Net Standard 1.6. Other sources claim, that UWP supports .Net Core or is .Net Core or runs with .Net Core, but apparently it's something else entirely? (As I learned from: https://stackoverflow.com/questions/38680266/is-net-for-universal-windows-program-a-subset-of-net-core). So everyone is saying something else. Which makes me hope the MSDN community knows it better..

    Reason for asking is that I need to migrate a library that used to target .Net Framework 4.5 to >>something<< I can use in a Universal Windows App (for now Universal.Desktop). Using the ApiPort analyzer of my DLL against the targets "Windows, Version=1.0", ".Net Standard, Version=1.4", ".Net Core, Version=2.0", I get different results. As .Net Core 2.0 has the smallest amount of code to rewrite, I would love to create a .Net Core library that I can use in UWP. Since .Net Core and UWP is the same thing.....(which I figure it's not) ... that should be a walk in the park, right?


    So enough of the ranting (and apologies for that), but what is the approach of creating a port of my library for my UWP in Visual Studio?

    1. Creating a Class Library (Universal Windows) -> Which is probably "Windows 10" target?

    2. Creating a Portbale Library targeting universal windows  -> which I don't even know what version of anything that will be

    3. Creating a Class Library (.NET Core) -> which doesn't want to be referenced by my UWP App, neither .Net Core 1.0 nor 2.0

    4. Creating a Class Library (.NET Standard)   -> of version... 1.4?

    And if it's one of the above or anything else, how to do that without too much pain? Can I retarget a VS project, or do I have to create a new one, copy all my files and then start fixing errors?

    Any kind of help or clarification on that topic would be very much appreciated! 

    Wednesday, August 16, 2017 10:22 AM