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
Unhandled Exception: System.MissingMethodException: No parameterless constructor defined for type 'System.Configuration.ClientConfigurationHost'.
at System.ActivatorImplementation.CreateInstance(Type, Boolean) + 0xfe
at System.Configuration.Configuration..ctor(String, Type, Object[]) + 0x5b
at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(ConfigurationFileMap, Boolean, ConfigurationUserLevel, String) + 0x104
at System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap, Boolean, ConfigurationUserLevel, String, Boolean) + 0x4d
at webapi_test.utils.ConfigUtil.initServerURLConfig() + 0x19
at Program.<Main>$(String[] args) + 0x2e
at webapi_mes!<BaseAddress>+0x11d0039
System.Configuration.ConfigurationManager package is not compatible with trimming and AOT (tracked by dotnet/runtime#49062). You should see a warning like Assembly 'System.Configuration.ConfigurationManager' produced trim warnings. during build. This warning says that there is a good chance that the app is not going to work.
Duplicate of dotnet/runtime#49062 that tracks trimming compatibility for System.Configuration.ConfigurationManager package.
@jkotas Can you give some advice? What library should I use instead of ConfigurationManager? Used to read and write files
Can you give some advice? What other utility classes support reading and writing configuration, and if I can't use ConfigurationManager, then what should I use?
Activity
jkotas commentedon May 19, 2023
The native AOT projects lives in http://github.com/dotnet/runtime now. Please open any issues http://github.com/dotnet/runtime.
System.Configuration.ConfigurationManagerpackage is not compatible with trimming and AOT (tracked by dotnet/runtime#49062). You should see a warning likeAssembly 'System.Configuration.ConfigurationManager' produced trim warnings.during build. This warning says that there is a good chance that the app is not going to work.Duplicate of dotnet/runtime#49062 that tracks trimming compatibility for
System.Configuration.ConfigurationManagerpackage.lozn00 commentedon May 20, 2023
@jkotas Can you give some advice? What library should I use instead of ConfigurationManager? Used to read and write files
Can you give some advice? What other utility classes support reading and writing configuration, and if I can't use ConfigurationManager, then what should I use?
jkotas commentedon May 20, 2023
Microsoft.Extensions.Configuration is going to be the trimming and AOT friendly in .NET 8 with the introduction of configuration source generators: https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-3/#introducing-the-configuration-binding-source-generator
lozn00 commentedon May 20, 2023
thank you