-
Notifications
You must be signed in to change notification settings - Fork 704
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
Can't add Material or Cupertino #10869
Comments
To help you with debugging here are some more info:
|
Hi @lotrasoft ! I'm not able to reproduce this in my sample apps. Would you be able to zip up your test app and post it here so I can take a look? |
I just created a new project and added Material. Here is the URL: https://github.com/lotrasoft/UnoPlatformTest2 I have upgraded to Visual Studio 17.4.4, but it was the same in 17.4.3. Here is the screen shot of the errors I get. Notice all the Visual Studio internal crashes as well: And here is the stack trace for Visual Studio's internal error:
|
@lotrasoft so I see a few things in the project,
Even with these changes, I am now seeing the issue you are experiencing. A quick workaround should be to include a later version of Uno.WinUI in the Windows head. So if you were to add I believe either we will need to bump the version of Uno that comes within Toolkit or we are missing a backport somewhere. cc: @jeromelaban, @MartinZikmund I think this is related to those other failures we had looked at before |
Regarding VS crashes, it looks like it was reported for Roslyn in dotnet/roslyn#57660. It looks like the fix from Roslyn (dotnet/roslyn#65039) targets 17.5. |
closes unoplatform/uno#10869 Newer version of Uno is needed to avoid build issues when Uno isn't already directly referenced with a newer version
Oh boy! after some tweaking and applying changes suggested by you, and updating Windows SDK, then searching on the errors and manually updating the Windows project file I could get the program to compile. But it still does not run. I have updated the repository with the changes if you wanted to check it out: https://github.com/lotrasoft/UnoPlatformTest2 It stops with this error:
|
@lotrasoft can you please try to update to latest Uno 4.7 to see what happens then? |
@MartinZikmund This is the process I went through: 1) Created a new blank Uno/Xamarin/UWP project 2) Added the nuget: "Uno.Toolkit.UI.Material" to all the projects. 3) Compile If you guys go through the same process and don't get these errors, we should examine our Visual Studio installation and see what is different. |
The errors in the screenshot are different than the one in the original post - have you tried following the error there - eg. Installing the package mentioned? But the odd thing is that Toolkit requires this reference 🤔 - @kazo0 should you need to install Skottie for Toolkit to work? |
@lotrasoft you also have to update the |
@jeromelaban & @MartinZikmund I started from scratch. Created a new project using the new Uno template, and added Material toolkit library - as I mentioned in my post. I first created the project from scratch using Uno/Xamarin/UWP template, and it was compiling and running just fine. These issues started appearing right after adding Material Toolkit nuget. So for fixing this, I guess the Material/Cupertino nuget and their toolkits should be adjusted to install the required libraries and make necessary changes. For testing, I added SkiaSharp.Skottie 2.88.1 to the Skia.Tizen, Wasm, Skia.Wpf, Skia.Wpf,Host, Skia.Gtk projects, and then I changed global.json file SDK from "5.0.0" to "6.0.0" and it started compiling. As another test I created a new Uno project, and SDK in global.json is "5.0.0" and it compiles and runs fine. But after adding Material, it starts giving an error about the SDK. So how was it working before adding Material? Might it be that Uno's core is referencing .NET 5, and Material/Cupertino are referencing 6? |
Can you provide a binlog of the failed build? |
@fsol11 Are you still having issues here? If so, can you provide more information? |
@fsol11 is this still relevant? |
thanks for following up. I actually don’t know if it’s still relevant or not. I abandoned my project at that time. |
Thank you for the information, closing this for now |
Current behavior
After adding Material or Cupertino packages, a lot of errors happen at compile time similar to this:
Error CS0433 The type 'Application' exists in both 'Microsoft.WinUI, Version=3.0.0.0, Culture=neutral, PublicKeyToken=de31ebe4ad15742b' and 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null' \
File: App.xaml.cs (Line: 15)
Basically, all classes that exist in Microsoft.UI and exist in Uno.UI as well will generate this error throughout the program.
Expected behavior
It should compile without any error.
How to reproduce it (as minimally and precisely as possible)
Create a new Uno Platform solution. Then add Uno.Toolkit.UI.Material to all the projects as per instructions. At this step project will not compile.
Workaround
There is no workaround. Material or Cupertino packages should be removed.
Works on UWP/WinUI
No
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
No response
Affected platforms
Windows
IDE
Visual Studio 2022
IDE version
Visual Studio 17.4.3
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: