-
Notifications
You must be signed in to change notification settings - Fork 89
Microsoft.Toolkit.Wpf.UI.Controls incompatible with .Net 5.0 #296
Comments
Hello matthew25187, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
Adding SupportedOSPlatformVersion 7.0 into your csproj file as message will remove this error. But, it will show another error message that you should use cswinrt to use WinRT API in .NET 5 |
Same issue here. |
Same on Winforms |
Why is this issue closed? I don't use WebView2. I need MapControl. |
I honestly don't understand why this was closed either. I encountered this issue while using the InkCanvas and InkToolbar. I was hoping to test out XAML Islands alongside the Windows 10 APIs being easily accessible when using .NET 5 at the same time. |
@nesherhh @JaykeBird sorry, I misread and didn't realize this was for the root package and not the WebView package and triaged incorrectly. I've re-opened the issue. |
I have the same issue. I have a large WPF app that I have been migrating to .NET 5. The migration is now complete. This morning me and my team are going to be re-writing some of our WPF/C# custom controls into C++/WinRT controls and hosting them in XMAL islands. Error NETSDK1135 SupportedOSPlatformVersion 10.0.18362.0 cannot be higher than TargetPlatformVersion 7.0. Gordon.UI.WPF C:\Program Files\dotnet\sdk\5.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 185 |
Unfortunately system XAML Islands doesn't work with .NET 5. .NET 3 Core included built-in WinRT projections, but .NET doesn't. The WinUI 3 version of XAML Islands will support .NET 5, however it's still in development, no ETA yet. |
I have removed the bug tag (it's not a bug, it's by design) and I added the feature request for WinUI 3. |
@marb2000 and @michael-hawker, it's kind of astonishing that XAML Islands are not being supported in .Net 5 and that this "is by design". Why bother with the WPF modernization saga if the real intent was to switch to WinUI? @deanchalk had a reasonable expectation that XAML Islands would be carried forward to .Net 5. There was no messaging suggesting otherwise. Strange. |
@Noemata Windows UI on some release 3.x (I presume this will be roughly in sync with .NET 6 release) will support WPF, WinForms, and XAML Islands. I imagine they've had to go through a lot of rearchitecture to get this to work, so it makes sense. https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/roadmap.md |
I accepted the deemphasis WPF when UWP was being heralded. It's gotten progressively harder to accept the choices being made by Microsoft. Some of these choices would be easier to swallow if some concessions were made about past mistakes, reducing the likelihood of repeats. Anyhow, I'll stop whining for the rest of this year and try to be part of the solution rather than part of the problem. If December roles around and XAML land is still unsettled, I'll crawl out from under the rock again. Here's the source material for XAML Islands v2: "What is your roadmap for XAML Islands v2? https://blogs.windows.com/windowsdeveloper/2019/06/13/xaml-islands-v1-updates-and-roadmap/ When I read this it sounded like .Net 5 would have this. Seems like too many eggs are being put in the WinUI basket. |
The blog post is out of date. Too many things happened between this blog post and today (including the pandemic). Some clarifications.
We know that it is frustrating when some technologies advance at a pace, like .NET, and others do not do it in time. But this effort that the team (WinUI 3) is making, in sync with other partners such as .NET and Visual Studio, is to solve this problem (and others). For having an alignment between all these technologies and updating at a similar rate. |
@marb2000, thanks for the clarification. The roadmap here: https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/roadmap.md Needs clarification as well. It's not obvious that XAML Islands go away with the initial introduction of .Net 5 and will reappear post WinUI 3.x release. Having information about the impact of the .Net Native compiler going away would be helpful so we know how tooling and deployments are affected (secured). Likewise for some other bits that re going away. It would help to mention WPF and where it fits in with WinUI. WPF devs might again feel deemphasized by this chart. Not a good thing given a lot of WPF positives were initiated by Microsoft of late. As you know tech going in and out of scope diminishes confidence and complicates planning. If Microsoft gives us an honest, complete and sober expression of direction we'll all be better off. I very much appreciate all the work you're doing @marb2000. I carefully track what you're up to. You're one of the UWP stars at Microsoft! It's been sad to see some of the changes within the team. |
Thanks @Noemata I opened a internal conversation about whether we should accelerate the support of XAML Islands for WinUI 3. It was moved to 2022 but let's see if we can create a solid engineering plan to support it in 2021. This will enable that WPF and WinForms .NET 5 apps can host WinUI 3 controls. About using .NET 5 instead .NET Native for UWP WinUI 3 apps, we understand your concerns about perf and security, but .NET team is very confident about offering something as good as .NET Native with the steady perf improvements that they are doing in each release of .NET. I believe on them. They are the experts. 😊 |
@marb2000 , you've answered all of my questions here and elsewhere. I think I've got the full picture now, to the extent I need it for my decision making. Thank you. |
I have started porting XAML Islands to .NET 5 - https://github.com/nesherhh/XamlIslandsNET5 |
Thanks for letting us know, FYI @marb2000. Just curious why you didn't fork the repo to start and maintain history & comparison of your changes from this base? |
It is a part of my pet project. I have removed many projects because I need just the MapControl. |
I'm not sure about that, you may need to fork it, and then from your local repo you could add that as an origin and try and rebase all your changes on-top of the repo without the removals. At this point, just keep us posted on how your project goes, and we'll see if we hear back from the WinUI folks if they have interest. They're pretty heads down on getting WinUI 3 out the door at the moment, so it may take them a bit to get back to us. Thanks! |
Is it in a progress? |
Is this dead, years later? Can we still not use WinRT controls in a .NET 5.0 WPF desktop app? I'm really questioning the future of WPF, this is all so incredibly confusing, I can't tell the difference between all of these slightly overlapping paradigms anymore, WPF/WinRT/UWP/WinUI, it's all so horribly confusing. |
PLEASE SHARE XAML ISLANDS DEV PROGRESS!!! |
@Dev-Taehui I think they are blocked by upstream: microsoft/microsoft-ui-xaml#7104 |
Islands was mentioned by the platform team in the community call here last month: https://www.youtube.com/live/xcgc5CLqUkM?feature=share&t=2997 That is the path forward, so watch the Windows App SDK for updates. Haven't had a chance to watch the call from today, so not sure if any update was provided. |
@boppbo @michael-hawker The app I created relies entirely on XamlIsland, so I was very nervous because I had no news of XamlIsland. I apologize for my aggressive behavior. I've seen the video, but I missed the part about XamlIsland. Fortunately, I'm relieved that it's developing well internally. I hope the preview version comes out soon. |
@Dev-Taehui appreciate you calling that out. I understand there's a lot of changes happening at the moment and it can be frustrating. I know the platform team is working really hard on moving things forward as best they can. We too have been waiting for it to leave experimental releases so we can better close this repo and point folks to their new home. Hopefully, we'll have more ideas of when that might be in the next few months from future updates from the platform team. |
Describe the bug
If I try to compile a .Net 5.0 WPF application that includes the Microsoft.Toolkit.Wpf.UI.Controls package, I get the following error:
NETSDK1135 SupportedOSPlatformVersion 10.0.18362.0 cannot be higher than TargetPlatformVersion 7.0. WpfApp1 C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets 185
Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
I should be able to successfully compile a .Net 5.0 project that includes the Microsoft.Toolkit.Wpf.UI.Controls package.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: