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

Winui 3 #31

Open
tinmac opened this issue Apr 7, 2024 · 13 comments
Open

Winui 3 #31

tinmac opened this issue Apr 7, 2024 · 13 comments
Labels
question Further information is requested

Comments

@tinmac
Copy link

tinmac commented Apr 7, 2024

Wondering if you plan on introducing a Winui 3 set?

Would be very welcome

@SKProCH SKProCH added the question Further information is requested label Apr 7, 2024
@SKProCH
Copy link
Owner

SKProCH commented Apr 7, 2024

Hello. Did you mean a package for WinUI or some set of WinUI styled icons?

@tinmac
Copy link
Author

tinmac commented Apr 7, 2024

A set of material icons we can use in winui 3

@SKProCH
Copy link
Owner

SKProCH commented Apr 7, 2024

It's should probably covered by this project: https://github.com/CastelloBrancoTecnologia/Material.Icons.UNO/

@SKProCH SKProCH closed this as completed Apr 7, 2024
@tinmac
Copy link
Author

tinmac commented Apr 10, 2024

@SKProCH Im using WinAppSDK, Material.Icons.Uno is for Uno -> WinUI 3

WinAppSDK/WinUI 3 is gaining a bit of traction now, I have no clue how to go about this so relying on more of an expert in the font field

@SKProCH SKProCH reopened this Apr 10, 2024
@SKProCH
Copy link
Owner

SKProCH commented Apr 10, 2024

Sorry, I can't fully get your point. Uno is just basically WinUI3 as far as I understand it. And also WinUI3 is a part of WinAppSDK. And you want a library for the WinAppSDK, so why is the Uno (WinUI) variant not suitable for you?

I just don't fully understand all this MS's zoo of UI frameworks.

@tinmac
Copy link
Author

tinmac commented Apr 10, 2024

Here is a minimal GitHub project showing the issue

I appreciate it isnt your repo as such but it demonstrates the issue

@SKProCH
Copy link
Owner

SKProCH commented Apr 10, 2024

Seems like I can't build your project:

dotnet build
MSBuild version 17.8.3+195e7f5a3 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Users\SKProCH\.nuget\packages\microsoft.windowsappsdk\1.4.230913002\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(590,9): error MSB3073: The command ""C:\Users\SKProCH\.nuget\packages\microsoft.windowsappsdk\1.4.230913002\buildTransitive\..\tools\net5.0\..\net472\XamlCompiler.exe" "obj\ARM64\Debug\net8.0-windows10.0.19041.0\\input.json" "obj\ARM
64\Debug\net8.0-windows10.0.19041.0\\output.json"" exited with code 1. [C:\Users\SKProCH\Downloads\WinUI3_MaterialIcons-master\WinUI3_MaterialIcons\WinUI3_MaterialIcons.csproj]

Looks like this issue: microsoft/microsoft-ui-xaml#8871

Probably you need to address this issue on the Material.Icons.Uno repository. In fact, the library for Uno/WinUI is located in a different repository, because I couldn't build the library for Uno/WinUI that was offered to me. Details and logs can be read here #26

I would really like to help, but apparently I won’t be able - all of Microsoft’s attempts at UI frameworks after WPF have such shitty cursed tooling that it’s naturally impossible to use them. Sorry.

@tinmac
Copy link
Author

tinmac commented Apr 10, 2024

You would need to be on VS 2022 or VS Code (not sure about rider or other IDE's) & on a windows PC for the project to compile & run.

No worries tho I understand if its not your usual stack. Appreciate you trying to help 👍

@SKProCH
Copy link
Owner

SKProCH commented Apr 11, 2024

Can't manage VS Code to work properly - same error as just dotnet build. Forced to install VS, and seems like finally able to compile the project. Such awful developing experience! Require VS installing to just build project - not surprised why all these UI frameworks failed to get community love.

After commenting the button reference in code behind to fix the

The name 'myButton' does not exist in the current contex

After that I've getting this exception:

Type universe cannot resolve assembly: Uno.UI, Version=255.255.255.255

Is this exception what you experience?

After a bit of googling seems like fix described here:
https://platform.uno/docs/articles/uno-community-toolkit.html?tabs=tabid-winui#referencing-the-windows-community-toolkit-from-a-cross-targeted-library

Probably the problem is in <PackageReference Include="Uno.WinUI" Version="5.0.48" /> which should be conditionally imported as stated in link above.

@tinmac
Copy link
Author

tinmac commented Apr 12, 2024

Sorry for the late reply

I don't see those errors you are getting, did you install the desktop workloads for VS 2022?

In Mainwindow if you comment out <icons:MaterialIcon ... it should build and run ok.

Here is the error I'm seeing

image

@SKProCH
Copy link
Owner

SKProCH commented Apr 12, 2024

Yep, seems like this is similar error. When I'm removing the element app will start fine.

Here is my errors:

image
image

Still think what conditional importing should help.

@tinmac
Copy link
Author

tinmac commented Apr 12, 2024

Experimenting with the namespace but get a slightly different error

image

@SKProCH
Copy link
Owner

SKProCH commented Apr 28, 2024

This is because icons2 refer to main library Material.Icons which doesn't contains any controls - just icons data.

Still think that this issues should be resolved in Material.Icons.Uno repository using this Uno guide: https://platform.uno/docs/articles/uno-community-toolkit.html?tabs=tabid-winui#referencing-the-windows-community-toolkit-from-a-cross-targeted-library
There is nothing what I can do on my side.

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

2 participants