You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android + iOS Maui Mobile.BuildTools.Configuration seems to work fine! Trying to initialise the configuration manager/register the dependency causes an exception for WinUI.
Full error message: System.UnauthorizedAccessException: 'Access to the path 'C:\WINDOWS\system32\Configuration' is denied.'
Reproduction Steps
Steps to reproduce the behavior:
Add Mobile.BuildTools and Mobile.BuildTools.Configuration to a Maui project
Add your app.config files as raw MauiAssets
Register the ConfigurationManager instance with DI
In the platform specific Window's App.xaml.cs, call ConfigurationManager.Init(true);
Expected Behavior
The WinUI app launches and the groundwork for using Mobile.BuildTools is setup
Actual Behavior
The app crashes on startup with an exception:
Removing the config code and only registering the ConfigurationManager.Current dependency:
When I try debugging inside the library, it appears to be using the CommonConfigManager which I think is the .NET Standard code path (intended for console apps/servers?).
Well for starters WinUI isn't a supported or tested target. If you'd like to contribute to the project I'd be happy to have it support WinUI. But I can't promise timelines if you're waiting on me.
Description
Android + iOS Maui Mobile.BuildTools.Configuration seems to work fine! Trying to initialise the configuration manager/register the dependency causes an exception for WinUI.
Full error message:
System.UnauthorizedAccessException: 'Access to the path 'C:\WINDOWS\system32\Configuration' is denied.'
Reproduction Steps
Steps to reproduce the behavior:
Mobile.BuildTools
andMobile.BuildTools.Configuration
to a Maui projectapp.config
files as raw MauiAssetsApp.xaml.cs
, callConfigurationManager.Init(true);
Expected Behavior
The WinUI app launches and the groundwork for using Mobile.BuildTools is setup
Actual Behavior
The app crashes on startup with an exception:

Removing the config code and only registering the ConfigurationManager.Current dependency:

When I try debugging inside the library, it appears to be using the

CommonConfigManager
which I think is the .NET Standard code path (intended for console apps/servers?).One theory I have is that the library doesn't know about WinUI TargetFramework (https://github.com/dansiegel/Mobile.BuildTools/blob/master/src/Mobile.BuildTools.Configuration/Mobile.BuildTools.Configuration.csproj#L42) and is therefore not invoking any of the UWP code (would the UWP code work for WinUI?).
Environment
Reproduction App
https://github.com/BurkusCat/MbtConfigurationWinUIException
The text was updated successfully, but these errors were encountered: