Enhancement: Add WebView2 C#/WinRT projection to requirements
I turned off WebView2 projection in my project. After that I have this issue:
In Resources.resw I have GetHelpButton.ToolTipService.ToolTip with value Get help.
On page I set l:Uids.Uid to button:
<Button x:Name="GetHelpButton" l:Uids.Uid="GetHelpButton" Padding="6" Click="GetHelpButton_Click"/>
But. if I navigate to page I have Failed to assign to property 'WinUI3Localizer.Uids.Uid'. [Line: 80 Position: 67]' exception on
Page.g.i.cs
global::Microsoft.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Microsoft.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
Call stack:
This exception was originally thrown at this call stack:
WinRT.ExceptionHelpers.ThrowExceptionForHR.__Throw|38_0(int)
ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.LoadComponent(WinRT.IObjectReference, object, System.Uri, Microsoft.UI.Xaml.Controls.Primitives.ComponentResourceLocation)
Microsoft.UI.Xaml.Application.LoadComponent(object, System.Uri, Microsoft.UI.Xaml.Controls.Primitives.ComponentResourceLocation)
Namespace.Views.MainPage.InitializeComponent() in MainPage.g.i.cs
Namespace.Views.MainPage.MainPage() in MainPage.xaml.cs
Namespace.Namespace_XamlTypeInfo.XamlTypeInfoProvider.Activate_145_MainPage() in XamlTypeInfo.g.cs
Namespace.Namespace_XamlTypeInfo.XamlUserType.ActivateInstance() in XamlTypeInfo.g.cs
ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(nint, nint*)
I use WinUI3Localizer version 2.3.0
When I turned WebView2 Projection back, issue is fixed and setting ToolTipService.ToolTip in .resw file is work
Hi @Storik4pro!🙂 Thanks for the feedback! Can you share a minimal project that reproduces the issue? A link to your repository or a zipped project attached here would be perfect.
Hi @Storik4pro, thank you for your patience. I was able to reproduce the issue on my side. However, I haven’t yet found a fix or workaround.
<WebView2EnableCsWinRTProjection>false</WebView2EnableCsWinRTProjection>
I’ll continue investigating and will update this thread once I have more information.