I am currently migrating a project and it's test projects from .Net Framework to .Net Core.
In .Net Framework, we used to be able to do something like this to set the EntryAssembly for tests :
AppDomainManager manager = new AppDomainManager();
FieldInfo entryAssemblyfield = manager.GetType().GetField("m_entryAssembly", BindingFlags.Instance | BindingFlags.NonPublic);
entryAssemblyfield.SetValue(manager, assembly);
AppDomain domain = AppDomain.CurrentDomain;
FieldInfo domainManagerField = domain.GetType().GetField("_domainManager", BindingFlags.Instance | BindingFlags.NonPublic);
domainManagerField.SetValue(domain, manager);
Taken from here : https://dejanstojanovic.net/aspnet/2015/january/set-entry-assembly-in-unit-testing-methods/
Since AppDomainManager is not available in .Net Core anymore, how can we accomplish something similar so that Assembly.GetEntryAssembly(); returns what I want instead of the tests project assembly.