Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

.NET Standard 2.1 support on Universal Windows Platform #1567

Closed
YZahringer opened this issue Sep 24, 2019 · 46 comments
Closed

.NET Standard 2.1 support on Universal Windows Platform #1567

YZahringer opened this issue Sep 24, 2019 · 46 comments
Labels
question General question, not a problem in source code or documentation (yet)

Comments

@YZahringer
Copy link

Regarding the support of .NET Standard 2.1 in UWP projects, it is written that it will be supported in the upcoming version.

This means that there will be the same problem as with the .NET Standard 2.0 version and that we will not be able to target older versions of Windows 10? .NET Standard 2.0 requires as min target version Windows 10 Fall Creators Update 16299.

This is a big problem for my projects and backward compatibility. I can't remove support for older versions of Windows 10, especially LTSC editions. This means that my projects are blocked in .NET Standard 1.4 and it also blocks any dependency updates:

  • Xamarin.Forms 2.5 because version >=3.0 requires .NET Standard 2.0
  • Microsoft.EntityFrameworkCore 1.1 because version >=2.0 requires .NET Standard 2.0
  • .NET Core 1.1 because version >=2.0 requires .NET Standard 2.0

I can't ask my users to have the latest version installed, especially in business applications and Windows LTSC editions. I have to wait several years before removing the support of an old version.

Is it planned to continue support the min target version 16299 of UWP projects with .NET Standard 2.1? I understand the constraints, but with Xcode I can still min target iOS 7 and with Android I can still min target 4.4 KitKat, still with the latest version of frameworks. And with Windows I can only support the latest version? That doesn't make much sense.

@richlander
Copy link
Member

I'm one of the people working on this. We're still working on our .NET 5 plan, which includes Xamarin and UWP. Our intention is to enable UWP apps to use .NET Core, which will resolve this request. We'll have more to share when we get through our planning process.

@YZahringer
Copy link
Author

@richlander thank you for the answer. It is planned to wait for the release of .NET 5 to have support for .NET Standard 2.1 in UWP? or is it the resolution of the dependency between the Windows build number and the version of .NET Standard that may be resolved with .NET 5?

In my opinion, the version of .NET Standard supported in a UWP application should not depend on the version/minTarget of Windows.

@KPixel
Copy link

KPixel commented Dec 18, 2019

@YZahringer As you can read on the blog post announcing .NET 5, all platforms will share the same runtime. So, they will all get the same new features more or less at the same time.

The more tricky question is: The UWP SDK will get these new features when a new version of Windows is released. We know that the current cadence is every March & September.
Considering that .NET 5 will be released in November 2020, does that mean that UWP will have to wait for March 2021 to get that update?

So, no .NET Standard 2.1 before March 2021? (That seems really late)
I was hoping that we would get it at the 20H1 update (in March 2020)... But if not, at least 20H2 would be better.

@shlitzi

This comment has been minimized.

@Happypig375
Copy link
Member

@shlitzi Care to elaborate?

@joperezr
Copy link
Member

joperezr commented Mar 2, 2020

@shlitzi let's try to be civil, if you have specific feedback we will be more than happy to help out or answer questions. Please review the COC.

@YZahringer
Copy link
Author

YZahringer commented Mar 18, 2020

No mention of UWP in the .NET 5 Preview 1 announcement and Unifying .NET 5 blog post

@Happypig375
Copy link
Member

@YZahringer
dotnet/designs#92 (comment)

@terrajobst:

@Perksey

There hasn't been much mention of UWP. In earlier revisions it seems it was touched upon, but later removed. Perhaps this can be detailed a little bit (perhaps in the FAQ section) as I have no idea how to use .NET Native with WinRT/UWP APIs in the current state of the proposal.

It was removed because the plan for UWP is still under heavy construction. We'll release a new design proposal once they are ready, but meanwhile we have to make progress for the platforms we already have a plan for.
We've talked with the Windows folks how this will work and we assume that using net5.0-windows will generally work for UWP as well. However, I expect that in contrast to WinForms/WPF UWP projects will likely use a version number (because of the WinRT bindings, which makes UWP similar to iOS/Android).
I would like to avoid net5.0-uwp because it would mean that unless we invent crazy TFM rules, code targeting net5.0-windows wouldn't be able to reference net5.0-uwp (and vice versa).

@terrycox
Copy link

If UWP is compatible with .NET Core 3, I assume I can put non-UI pieces such as viewmodels and services in a .NET Core 3 library and access from a UWP app?

@Perksey
Copy link
Member

Perksey commented Mar 31, 2020

If UWP is compatible with .NET Core 3, I assume I can put non-UI pieces such as viewmodels and services in a .NET Core 3 library and access from a UWP app?

Maybe, but a lot of UWP is tied to .NET Native and WinRT - pretty much anything that isn’t is already contained within the .NET Core spec to my knowledge.

@Eli-Black-Work
Copy link

Has there been any update on this?

@Perksey
Copy link
Member

Perksey commented Jul 6, 2020

The way you use C# from WinRT is changing. Read: https://docs.microsoft.com/en-us/windows/uwp/csharp-winrt/

@Panda-Sharp
Copy link

I'm one of the people working on this. We're still working on our .NET 5 plan, which includes Xamarin and UWP. Our intention is to enable UWP apps to use .NET Core, which will resolve this request. We'll have more to share when we get through our planning process.

Hi @richlander are you able to kindly provide us some update? thanks!

@terrycox
Copy link

terrycox commented Oct 1, 2020 via email

@amirvenus
Copy link

Is there any updates on this?

We really need to use .NET Standard 2.1 in our project but can't do so as it will leave out our UWP target in Xamarin.forms

@massijay
Copy link

massijay commented Oct 22, 2020

Is there any updates on this?

We really need to use .NET Standard 2.1 in our project but can't do so as it will leave out our UWP target in Xamarin.forms

As they said during yesterday's WinUI community call (issue) there is a lot of under-the-hood work that is being done for UWP and .NET.
UWP will eventually have full .NET 5 or 6 support (so no .NET Standard 2.1) and an early preview will be available next month.

@christiannagel
Copy link
Collaborator

With .NET 5 support, .NET Standard 2.1 is supported as well.

@massijay
Copy link

With .NET 5 support, .NET Standard 2.1 is supported as well.

Yes sorry I meant no .NET Standard 2.1 before .NET 5

@tranb3r
Copy link

tranb3r commented Oct 23, 2020

But Xamarin Forms won't support .NET 5, right ?
So XF supports netstandard 2.1 for android and ios, but will be stuck to netstandard 2.0 when targeting UWP.
Or maybe there is something I don't understand...

@MagicAndre1981
Copy link

So XF supports netstandard 2.1 for android and ios, but will be stuck to netstandard 2.0 when targeting UWP.

this is what I also understand and XF5 is last classic XF version, next will be .NET MAUI and this runs on .net 6 which has same API to all Operating systems

@sheharyarshahid
Copy link

Any date for when we can target UWP to .Net Standard 2.1?

@amirvenus
Copy link

@sheharyarshahid An early preview of .NET 5 support will be available next month. .NET 5 supports .NET Standard 2.1.

Is it possible to use .NET 5 for Xamarin.Forms now so that we can include UWP?

@brminnick
Copy link

brminnick commented Dec 13, 2020

@amirvenus

Xamarin.iOS and Xamarin.Android don't support .NET 5.

Both Xamarin.iOS and Xamarin.Android will support .NET 6.

@cesarsouza
Copy link

Has this been released already?

@Gavin-Williams
Copy link

Gavin-Williams commented Dec 25, 2020

@cesarsouza No it hasn't, 2021 sometime.

@HppZ
Copy link

HppZ commented Mar 18, 2021

I'm one of the people working on this. We're still working on our .NET 5 plan, which includes Xamarin and UWP. Our intention is to enable UWP apps to use .NET Core, which will resolve this request. We'll have more to share when we get through our planning process.

any update

@VigneshVoid
Copy link

It's been nearly one and half years are there any update? Please update if support for uwp is dropped. At least we will consider changing our apps to other platforms like WPF. Prolonging it for long time without any update makes us concern about state of our applications.

@Perksey
Copy link
Member

Perksey commented Jun 11, 2021

I don't think there's going to be anything new on this thread for a while, but needless to say .NET Standard is dead. They're not going to bother with supporting just .NET Standard 2.1, the next big thing for UWP will be taking it all the way and supporting .NET 6 as every other .NET platform is moving to do so. There won't be any .NET Standard 2.1 on UWP until .NET 6 is on UWP, that I can practically guarantee you.*

* not a MSFT employee but it just makes logical sense

@KPixel
Copy link

KPixel commented Jun 11, 2021

We already have some answers.
Here is my summary: (may contain some inaccuracies, I don't work for Microsoft)

@Perksey
Copy link
Member

Perksey commented Jun 12, 2021

WinUI 3 Desktop app + .NET 6 + C#/WinRT + NativeAOT + MSIX

This doesn't necessarily include the Universal App Platform, which is still the only way independent developers can target Xbox and HoloLens devices themselves. If they added UWP plumbing to NativeAOT and allowed for APPX deployments in the SDK somehow, and then brought all of these into a production-ready capacity then this could work. But that's a lot of ifs.

@KPixel
Copy link

KPixel commented Jun 12, 2021

@Perksey WinUI 3.0 Feature Roadmap includes: "Works on additional Windows form factors (Xbox, HoloLens, IoT, Surface Hub)".

I expect this whole vision to take another year to come together.

@dan-meier
Copy link

@KPixel >> "I expect this whole vision to take another year to come together."

That'd be another year AFTER the .NET 6 release late this year. So another year-and-a-half from now.

For developers who have invested in UWP, it'd be nice to "officially" know what the UWP roadmap looks like between now and when things "come together." The deafening silence from Microsoft makes it really hard to plan.

@Gavin-Williams
Copy link

Gavin-Williams commented Jun 14, 2021

It's kinda disgusting that UWP dev's invested so much time and effort into what was meant to be the future Windows application model. Supporting Microsoft's decision and riding with it. Only for the platform to be ultimately stopped before the finish line, never to be worked on again - stuck on C# OLD (insert all the other UWP issues that were never fixed) and then told to wait for years while they update WinForms, WPF and XPlat customers to a new .net - updates for the very people who stuck their nose up at a new Windows app model and refused to use it, or aren't even interested in anything new for Windows anyway.

UWP (in whatever form it will take) should have been at the forefront of the whole .Net 5 and Reunion effort. Instead, the forward thinking model is pushed to the very back. Yep, that's a big F-U in my books.

@Gavin-Williams
Copy link

@VoidExploiter "At least we will consider changing our apps to other platforms like WPF" - Coming from UWP, wouldn't you move onto WinUI? WinUI is, after all, an evolution of UWP.Xaml.

@maxkatz6
Copy link

@richlander should this issue be closed? Since, let's be real, no way it will be done.

@HppZ
Copy link

HppZ commented Aug 23, 2021

No hope.

@pjmlp
Copy link

pjmlp commented Aug 23, 2021

@Gavin-Williams

Lets count the rewrites, Windows 8 not compatible with XNA and Silverlight.

XNA developers abandoned just like UWP nowadays, told to learn C++ and migrate to DirectXTK.

Windows 8.1 introduces UAP, yet another rewrite.

Windows 10 improves on UAP with UWP, again another rewrite.

C++ politics inside Windows team manage to kill C++/CX without comparable tooling after 4 development. .NET devs that need to use C++ for native integrations are now downgraded to a development experience akin to using Visual C++ 6.0 with ATL.

We discover that XBox and HoloLens are moving away from UWP via their own SDKs, no official communication about it.

MAUI is using an iOS porting toolkit instead of proper macOS APIs, Blazor is getting pushed everywhere.

After investing so much into UWP and seeing all of this, they just burned all the trust of small developers.

I fear even WinUI 3.0 won't rescue this mess.

@Perksey
Copy link
Member

Perksey commented Aug 23, 2021

Today, UWP remains the only way to target Xbox without a NDA - a minority anyway though something Microsoft tried to push with the Xbox Creators Program.

But other than targeting HoloLens and Xbox, there's no reason to use UWP. WinRT will remain alive and well, and is seeing lots of investment, but the investment is in bringing the rich functionality that WinRT in UWP provided to regular Win32 applications.

Another way of looking at this is that Microsoft tried to get Windows developers to adopt its UWP model but too many of them refused – for all sorts of reasons. The result is that Redmond has had to backtrack, unfortunately at the expense of the keen minority who did adopt it.

- The Register

Thus, there will not and likely never be any investment in moving this issue forward.

@pjmlp
Copy link

pjmlp commented Aug 23, 2021

HoloLens doesn't use UWP any longer, rather OpenXR.

XBox is now pushing for GDK for anyone that wants a go at its app store, leaving UWP for community only, unsupported projects. GDK also documents the WinRT based framework (ERA) as legacy.

This is what I meant by only being aware of it via their documentation.

Forms, WPF and Win32 are indeed the only way forward to all of us burned by rewrites.

Sadly the way things are being communicated, no one at the steering wheel seems to really get it, that they have burned all the bridges. Even their own teams rather use Electron!

@John0King
Copy link

John0King commented Aug 23, 2021

it seems every platform which used .net in past , now they either die (win phone) or want get rid of .net

@ghost
Copy link

ghost commented Sep 1, 2021

WinRT will remain alive and well

WinRT is COM version 2 and COM itself is essentially a native object exposing mechanism and has nothing to do either with UWP or Win32 or Any kind of any AppModels whatsoever in any way shape or form.

@Perksey
Copy link
Member

Perksey commented Sep 1, 2021

Yes, I'm aware of that.

@pubtom
Copy link

pubtom commented Nov 29, 2021

If you need .NET>5 in UWP please give a vote on this: https://developercommunity.visualstudio.com/t/Add-NET-678-support-to-UWP/1596483

@terrajobst terrajobst added the question General question, not a problem in source code or documentation (yet) label Aug 18, 2022
@terrajobst
Copy link
Member

We're closing this as out of scope.

The explanation was already provided by @OliaG in the community item, posted for convenience here:

We are not bringing any updates to UWP but we are working on an easy migration path from UWP to WinUI 3 with Upgrade Assistant. WinUI is the future of UWP that will receive all the new feature and updates. Have you tried to port your application to WinUI 3? If there are any blockers that prevent you from the migration, we would be very interested in learning more about it! Feel free to create an issue describing any challenges and we will work on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question General question, not a problem in source code or documentation (yet)
Projects
None yet
Development

No branches or pull requests