Write a test that depends on Assembly.GetEntryAssembly having a meaningful value. For example all the ASP.NET Core stuff that uses DependencyContext.Default goes off of Assembly.GetEntryAssembly
It should have a value of the unit tested assembly
It is null
Before .NET Core, I think that would have been too much of a violation of what GetEntryAssembly means. See Jon Skeet's response when similar was asked for NUnit: http://stackoverflow.com/a/26254779
For an ASP.NET Core application, though, I'll need to know more. When the application is really running, what does that method return for you? Is it the assembly that includes the Main method that in turn kicks off Kestrel? I think returning "the unit tested assembly" is potentially ambiguous, though.
Since ASP.NET Core is just a console app, it returns the expected ASP.NET Core project assembly.
The other alternative is for me to set the entry assembly from my unit test project. See: https://github.com/jbogard/ContosoUniversityCore/blob/master/test/ContosoUniversityCore.IntegrationTests/SliceFixture.cs#L40
File this under "things that used to work with AppDomains" because DependencyContext.Default uses GetEntryAssembly instead of AppDomain.CurrentDomain
FYI I opened an issue with .NET Core on this: dotnet/core-setup#1017