System.Activator.GetObject - Method not found

Viewed 25

in my new position as a junior developer, I am working on a .net core 6 API project (project "A"), which calls a .Net Framework 4.8 project (project "B") .

Project A calls a method of project B, which calls Activator.GetObject :

Config configRemote = (Config)Activator.GetObject(typeof(Config)

project A then raises an error:

System.MissingMethodException HResult=0x80131513 Message=Method not found: 'System.Object System.Activator.GetObject(System.Type, System.String)'. ...

According to my readings, System.Activator is not integrated in .Net Core 6. Do you know why this error occurs, and how to work around it? Thanks for your help, and have a nice day. Pierre

0 Answers
Related