Closed s-beltz closed 3 years ago
Thank you for the report!
Could you attach a sample solution reproducing the issue ?
Thank you for the report!
Could you attach a sample solution reproducing the issue ?
Hi @jeromelaban, when building the minimal repro we found out that we have an issue in our library layout possibly related to MSBuild.Sdk.Extras version. The minimal repro works as expected except for a minor layout issue in Android that is not relevant to us at the moment. Sorry for not checking in advance, closing this issue for now.
@s-beltz so what exactly was the issue?
We have System.TypeLoadException: 'Could not resolve type with token 0100002e from typeref (expected class 'Windows.UI.Core.UIAsyncOperation' in assembly 'Uno, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null')'
on .NET 6
Hello @Juriyx, as far as I can remember, this issue was related to the combination of multi platform builds with MSBuild.Sdk.Extras and custom controls. Our problem went away with an update of MSBuild.Sdk.Extras at the time. Unfortunately, this seems not to be related to your issue.
We have
System.TypeLoadException: 'Could not resolve type with token 0100002e from typeref (expected class 'Windows.UI.Core.UIAsyncOperation' in assembly 'Uno, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null')'
on .NET 6
You're likely having an issue with an Uno 3.x and Uno 4.x combination, most likely because of a library you're referencing that has not been updated to Uno 4. It'd be best to open a discussion if this is not the case.
Current behavior
When using ItemsRepeater inside UserControl System.Exception is thrown upon loading the UserControl.
Expected behavior
ItemsRepeater is loaded and displayed correctly.
Exception Stack
System.Exception: 'Failed to load ApliconusUnoDemoApp.MainPage: System.TypeLoadException: Could not load type of field 'Apliconus.CompositeViews.Portfolio.PortfolioView:_component_0' (2) due to: Could not resolve type with token 01000023 from typeref (expected class 'Microsoft.UI.Xaml.Controls.ItemsRepeater' in assembly 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null') assembly:Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null type:Microsoft.UI.Xaml.Controls.ItemsRepeater member:(null) at ApliconusUnoDemoApp.MainPage..ctor () [0x000df] in C:\VSO2.1\5-Apps\APLICONUS Foundation 5.1\Demos\ApliconusUnoDemoApp\ApliconusUnoDemoApp.Shared\MainPage.xaml.cs:111 at ApliconusUnoDemoApp.Droid.MetadataBuilder_890.CreateInstance () [0x00000] in C:\VSO2.1\5-Apps\APLICONUS Foundation 5.1\Demos\ApliconusUnoDemoApp\ApliconusUnoDemoApp.Droid\obj\Debug\100\g\BindableTypeProvidersSourceGenerator\BindableMetadata.g.cs:36320 at Windows.UI.Xaml.Controls.Frame.CreatePageInstance (System.Type sourcePageType) [0x00016] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:416 at Windows.UI.Xaml.PagePool.DequeuePage (System.Type pageType) [0x00007] in C:\a\1\s\src\Uno.UI\UI\Xaml\PagePool.cs:69 at Windows.UI.Xaml.Controls.Frame.CreatePageInstanceCached (System.Type sourcePageType) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:406 at Windows.UI.Xaml.Controls.Frame.InnerNavigate (Windows.UI.Xaml.Navigation.PageStackEntry entry, Windows.UI.Xaml.Navigation.NavigationMode mode) [0x000a1] in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Frame\Frame.cs:313 '
How to reproduce it (as minimally and precisely as possible)
This UserControl in a blank Uno app produces the mentioned exception
Workaround
Environment
Nuget Package:
Nuget Package Version(s):
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?