dotnet / standard

This repo is building the .NET Standard
3.07k stars 428 forks source link

.NET Standard 2.1 support on Universal Windows Platform #1567

Closed YZahringer closed 2 years ago

YZahringer commented 5 years ago

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:

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.

YZahringer commented 5 years ago
richlander commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

@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 commented 4 years ago

What the fuck?????

Happypig375 commented 4 years ago

@shlitzi Care to elaborate?

joperezr commented 4 years ago

@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 commented 4 years ago

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

Happypig375 commented 4 years ago

@YZahringer https://github.com/dotnet/designs/pull/92#issuecomment-596734590

@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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Has there been any update on this?

Perksey commented 4 years ago

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

Panda-Sharp commented 4 years ago

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 commented 4 years ago

Thanks much. I don’t know MS’ internal issues and needs with this, but Amin’s approach and CoreRT (GitHub - dotnet/corert: This repo contains CoreRT, an experimental .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying compiler toolchain. https://github.com/dotnet/corert ) are two that interest me. I’d love to see, but doubt I will, a unified type system.

Certainly, a common program startup and window would help.

From: emiliano84 notifications@github.com Sent: Tuesday, September 29, 2020 9:48 AM To: dotnet/standard standard@noreply.github.com Cc: Terry Cox tcox@svsoft.com; Comment comment@noreply.github.com Subject: Re: [dotnet/standard] .NET Standard 2.1 support on Universal Windows Platform (#1567)

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 https://github.com/richlander are you able to kindly provide us some update? thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dotnet/standard/issues/1567#issuecomment-700715382 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZCYWJE2TZ3NMIVYDAFDLSIHQPPANCNFSM4IZ4AOAA . https://github.com/notifications/beacon/ABKZCYRTAJ3VDGE3PIOGT3TSIHQPPA5CNFSM4IZ4AOAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFHCBC5Q.gif

amirvenus commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

massijay commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Perksey commented 3 years ago

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

amirvenus commented 3 years ago

@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 commented 3 years ago

@amirvenus

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

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

cesarsouza commented 3 years ago

Has this been released already?

Gavin-Williams commented 3 years ago

@cesarsouza No it hasn't, 2021 sometime.

HppZ commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Perksey commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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

HppZ commented 3 years ago

No hope.

pjmlp commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

ghost commented 3 years ago

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 commented 3 years ago

Yes, I'm aware of that.

pubtom commented 2 years ago

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 commented 2 years ago

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.