Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows App SDK projects #137

Open
wldevries opened this issue Mar 4, 2021 · 8 comments
Open

Add support for Windows App SDK projects #137

wldevries opened this issue Mar 4, 2021 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@wldevries
Copy link

The library uses the WinRT Bluetooth API, so this should be possible. It confuses me that the SharpBrick.PoweredUp.WinRT package does not target UWP.

@tthiery tthiery self-assigned this Mar 4, 2021
@tthiery tthiery added the question Further information is requested label Mar 4, 2021
@tthiery
Copy link
Member

tthiery commented Mar 4, 2021

Yeah ... that is the epic confusion the Windows division at Microsoft has unleashed on us.

So to my understanding:

  • WinRT is a API set based on COM in parallel to Win32. This includes e.g. the WinUI 3.x but also the Bluetooth stack used here.
  • UWP = WinRT + MSIX packaging + Sandboxing + some compilation toolchains (like WinJS, .NET Native, ...).

Therefore the naming of WinRT in the Bluetooth layer.

Microsoft is currently not fully supporting C# 8.0 for UWP (I think Span and default interface methods when I remember right). This is planned (to my humble understanding) for end of 2021 when they enable .NET 5 or .NET 6 on UWP. There is Project Reunion which is dramatically reworking the space right now.

I know that this library has a very limited installation based (basically .NET Core 3.1 + with .NET Core based WinForms/WPF). I am open for a discussion around enabling it on UWP. However, I would prefer avoiding a major rework if later the year it gracefully resolves itself.

@wldevries
Copy link
Author

wldevries commented Mar 5, 2021

Thanks for the reply. As far as I understand it UWP is the new name of what WinRT used to be, so just a marketing term. I'm not sure, but I get the feeling they intend to replace UWP entirely with the new WinUI framework.

As for UWP support, I really don't need this library to work with UWP, but if you did do a rework you could support .NET Framework as well. I guess hobby projects tend to use newer tools, so that's probably not worth it.

@tthiery
Copy link
Member

tthiery commented Mar 5, 2021

I would love to support the .NET Framework for people playing with older tools. But the framework does not support the toys I want to play with (aka. C# 8.0 oder C# 9.0).

I think I let the time handle this. Are you bound to .NET Framework?

@Berdsen
Copy link
Contributor

Berdsen commented May 13, 2021

Hi @tthiery and @wldevries,
I'm not tot deep into UWP developing but I guess it can use .netstandard 2.1 libraries?
I played a little bit around with the Mobile / Xamarin solution and when using the correct Plugin.BLE version I could create a Xamarin UWP project.

As I said, I'm not too deep into UWP so I'm not knowing exactly where the differences between Xamarin UWP and a real UWP solutions are, but it might be worth a shot, to implement this into the mobile lib?

@wldevries
Copy link
Author

The problem is that you cannot target a NET Standard 2.0 library that uses Windows SDK methods. The library will need to target uap10.0.0.17763 or something similar. Adding a dependency on Microsoft.Windows.SDK.Contracts in the library will cause compile time problems for the UWP project.

As far as I'm concerned this ticket can be closed. Anyway UWP will be superseded by WinUI 3 very soon.

@tthiery
Copy link
Member

tthiery commented May 14, 2021

@Berdsen Interesting. To my understanding, netstandard2.1 is not supported on UWP and .NET Framework. That means Span and certain C# 8+ features are not supported. That eliminates the SharpBrick.PoweredUp core library to be unusable in its current state. The WinRT BT Adapter could be multi-targeted I guess, but I do not want to be restricted by UWP C# currently.

Like @wldevries: the wave of WinUI 3 will solve this soon. Build Conference is in 11 days, then we should also hear some updates from Microsoft on the topic.

@tthiery
Copy link
Member

tthiery commented May 14, 2021

@wldevries I keep this open to track the progress.

@tthiery
Copy link
Member

tthiery commented Oct 31, 2021

It looks like UWP is not getting updated to .NET 5 and .NET 6.

Way forward is Windows App SDK apps using WinUI 3.

@tthiery tthiery changed the title Add support for UWP projects Add support for Windows App SDK projects Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants