Open 4OTbIPE opened 2 months ago
For some reason, even when creating a new project from a template, when updating to 1.6 and setting the PublishAot property, the application crashes when launched
For some reason, even when creating a new project from a template, when updating to 1.6 and setting the PublishAot property, the application crashes when launched
Did you install cswinrt2.1.1 after the upgrade?
For some reason, even when creating a new project from a template, when updating to 1.6 and setting the PublishAot property, the application crashes when launched
Did you install cswinrt2.1.1 after the upgrade?
Yes
For some reason, even when creating a new project from a template, when updating to 1.6 and setting the PublishAot property, the application crashes when launched
Did you install cswinrt2.1.1 after the upgrade?
Yes
You could repalce XamlControlsResources with
https://github.com/Gaoyifei1011/GetStoreApp/blob/main/GetStoreApp/WinUIApp.xaml
This can also include the style of the winui 3 controls, which worked well in my application
This seems to be a bug in CommunityToolkit. After downgrading the packages from 8.1 to 8.0, the app no longer crashes @michael-hawker
This seems to be a bug in CommunityToolkit. After downgrading the packages from 8.1 to 8.0, the app no longer crashes @michael-hawker
Please be sure to read our release notes, there's many pitfalls with ensuring the updating of TFMs, publish profiles, and a regression if you have a WAP project setup. More info in this issue: https://github.com/CommunityToolkit/Windows/issues/489
We also haven't fully tested/updated against 1.6 and Native AOT (we have most annotations now, but haven't validated controls). Our tracking issue for that work is here: https://github.com/CommunityToolkit/Tooling-Windows-Submodule/issues/205 - we should have a build in our public ADO feed out of main built against 1.6 for early testing shortly. The packages for 1.6-preview2 are being merged today and should be available shortly.
I am also seeing this problem and still seeing it after down grading all of the community toolkits to the closest version to 8.0. it's only happening for me in debug using VS, and from what I've read this seems to be a recurring problem. so we are clear VS 2022 17.11.3, SDK 1.6.240829007, with build tools 10.0.26100.1
update: I updated all the packages again, with the exception of the build tools which i down graded to the previous version: Microsoft.Windows.SDK.BuildTools Version=10.0.22621.3233 everything now works. I don't know who is responsible for maintaining that pack, but the latest version is clearly faulty.
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.1" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.1.240821" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" />
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
Pairing down the key difference here from @thales-man's comment above:
It's only happening in Debug using VS 2022 17.11.3, SDK 1.6.240829007, with build tools 10.0.26100.1
with previous version: Microsoft.Windows.SDK.BuildTools Version=10.0.22621.3233 everything now works.
Looks like something maybe regressed in the newest build tools package then?
do you have any class library which contains Resource dictionary and you are refrencing it in app.xaml ? https://github.com/microsoft/microsoft-ui-xaml/issues/10020
do you have any class library which contains Resource dictionary and you are refrencing it in app.xaml ? microsoft/microsoft-ui-xaml#10020
I'm not sure what you're asking. And I'm not sure who are you asking?
Personally, I've posted a result, so I've moved on. I welcome an update to the build tools once they've fixed it.
do you have any class library which contains Resource dictionary and you are refrencing it in app.xaml ? microsoft/microsoft-ui-xaml#10020
I'm not sure what you're asking. And I'm not sure who are you asking?
Personally, I've posted a result, so I've moved on. I welcome an update to the build tools once they've fixed it.
I asked the starter. Changing buildtools solves the problem but (if you don't have a class library + Resource Dictionary)
do you have any class library which contains Resource dictionary and you are refrencing it in app.xaml ? microsoft/microsoft-ui-xaml#10020
I'm not sure what you're asking. And I'm not sure who are you asking?
Personally, I've posted a result, so I've moved on. I welcome an update to the build tools once they've fixed it.
I asked the starter. Changing buildtools solves the problem but (if you don't have a class library + Resource Dictionary)
It helped me roll back to version 8.0 of CommunityToolkit, but yesterday they released a new version on which I haven't tested this error yet
I asked the starter.
<?xml version="1.0" encoding="utf-8"?> <Application x:Class="My.Host.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</ResourceDictionary.MergedDictionaries>
<!-- color brushes -->
<SolidColorBrush x:Key="ErrorColor" Color="Red" />
like this? so I have a class and resources?
It helped me roll back to version 8.0 of CommunityToolk
like this:
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="ms-appx:///WinUICommunity.Components/Themes/Generic.xaml" />
<ResourceDictionary Source="ms-appx:///WinUICommunity.LandingPages/Themes/Generic.xaml" />
<ItemTemplates xmlns="using:WinUICommunity" />
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
It helped me roll back to version 8.0 of CommunityToolk
like this:
<ResourceDictionary.MergedDictionaries> <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> <ResourceDictionary Source="ms-appx:///WinUICommunity.Components/Themes/Generic.xaml" /> <ResourceDictionary Source="ms-appx:///WinUICommunity.LandingPages/Themes/Generic.xaml" /> <ItemTemplates xmlns="using:WinUICommunity" /> </ResourceDictionary.MergedDictionaries> <!-- Other app resources here -->
that didn't work for me, I've already tried it.
It helped me roll back to version 8.0 of CommunityToolk
like this:
<ResourceDictionary.MergedDictionaries> <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> <ResourceDictionary Source="ms-appx:///WinUICommunity.Components/Themes/Generic.xaml" /> <ResourceDictionary Source="ms-appx:///WinUICommunity.LandingPages/Themes/Generic.xaml" /> <ItemTemplates xmlns="using:WinUICommunity" /> </ResourceDictionary.MergedDictionaries> <!-- Other app resources here -->
that didn't work for me, I've already tried it.
i tried with a very very simple rd, and it seems that resources can not be found.
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ClassLibrary1">
<Style x:Key="BorderPanel"
TargetType="Border">
<Setter Property="Margin" Value="{ThemeResource NavigationViewContentMargin}" />
<Setter Property="BorderThickness" Value="1" />
</Style>
</ResourceDictionary>
@Scottj1s @codendone Is this problem related to a known problem?
Describe the bug
After updating from 1.5 to 1.6 application starts crashing
Steps to reproduce the bug
After updating from 1.5 to 1.6 application starts crashing, with NativeAOT enabled
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007
Windows version
Windows 10 (21H2): Build 19044
Additional context
No response