Forum Discussion
Vegeta4205
Mar 15, 2022Copper Contributor
.NET MSIX config file location
I'm using MSIX packaging in .NET 5 WPF. I'm also using a generic host, so I build the config file via IConfigurationBuilder. Where are my config files copied to on MSIX? The build ...
Vegeta4205
Mar 24, 2022Copper Contributor
I found the answer.
On MSIX, HostBuilderContext.HostingEnvironment.ContentRootPath behaves differently.
I solved it by replacing System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) with this
On MSIX, HostBuilderContext.HostingEnvironment.ContentRootPath behaves differently.
I solved it by replacing System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) with this