WindowsAppSDK
WindowsAppSDK copied to clipboard
Resw aka Resources can't be Accessed Between WinUI Based Class Library Projects in Xaml
Resw aka Resources can't be Accessed Between WinUI Based Class Library Projects in Xaml.
When Trying to Access Resources that Part of Main App Project with Xaml from a WinUI Based Class Library Which is Not Directly Dependent on Main Project Instead Main Project is Depended on that WinUI Based Class Library, it just doesn't Work and No Exception Whatsoever, If we try the Same by Using ResourceLoader in C#, It Just Works as Expected, I'm not sure this a bug or it's Intended Behavior
- Repo for Reproducing https://github.com/AathifMahir/ResWDemoAppProject
You are doing wrong... You can not use strings exist in Main Project in class library, but you can use class library strings resources in your Main App
You are doing wrong... You can not use strings exist in Main Project in class library, but you can use class library strings resources in your Main App
I'm looking for way to use strings from class library, but that doesn't work at all and the app doesn't pick up any resources when the resources were in class library but as an exception when we have exactly same resources in class library and app project, that fixes the issue. I'm not sure on how resource work anymore since resources are app wide not constraints to different projects, The Resources are App wide is True when we are accessing resources using ResourceLoader or ResourceMap in c# aka CodeBehind or Somewhere else. but doesn't work with Xaml
If i remember correctly, Previously on UWP having Packaging Project with Strings in it Fixes these kind of issues but Not on WinUI 3
You are doing wrong... You can not use strings exist in Main Project in class library, but you can use class library strings resources in your Main App
I'm looking for way to use strings from class library, but that doesn't work at all and the app doesn't pick up any resources when the resources were in class library but as an exception when we have exactly same resources in class library and app project, that fixes the issue. I'm not sure on how resource work anymore since resources are app wide not constraints to different projects, The Resources are App wide is True when we are accessing resources using ResourceLoader or ResourceMap in c# aka CodeBehind or Somewhere else. but doesn't work with Xaml
If i remember correctly, Previously on UWP having Packaging Project with Strings in it Fixes these kind of issues but Not on WinUI 3
See here https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/ResourceManagement/cs/cs-winui
You are doing wrong... You can not use strings exist in Main Project in class library, but you can use class library strings resources in your Main App
I'm looking for way to use strings from class library, but that doesn't work at all and the app doesn't pick up any resources when the resources were in class library but as an exception when we have exactly same resources in class library and app project, that fixes the issue. I'm not sure on how resource work anymore since resources are app wide not constraints to different projects, The Resources are App wide is True when we are accessing resources using ResourceLoader or ResourceMap in c# aka CodeBehind or Somewhere else. but doesn't work with Xaml
If i remember correctly, Previously on UWP having Packaging Project with Strings in it Fixes these kind of issues but Not on WinUI 3
See here https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/ResourceManagement/cs/cs-winui
I tried example in the url, that also has same issue when using Xaml, with c# resources works perfectly but with Xaml I keep facing the same issue unless we have a resources.resw file that aligns with main resources.resw file and on that class library assembly