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
When supplying your own entrypoint, with disabled GenerateTestingPlatformEntryPoint, CodeCoverage and MSTest aren't injected into the SelfRegisteredExtensions.
public static async Task<int> Main(string[] args)
{
var builder = await TestApplication.CreateBuilderAsync(args);
SelfRegisteredExtensions.AddSelfRegisteredExtensions(builder, args);
using var app = await builder.BuildAsync();
return await app.RunAsync().ConfigureAwait(false);
}
Fails with:
Unhandled exception. System.InvalidOperationException: Testframework-Adapter not registered. Use "ITestApplicationBuilder.RegisterTestFramework", to register.
at Microsoft.Testing.Platform.Builder.TestApplicationBuilder.BuildAsync() in /_/src/Platform/Microsoft.Testing.Platform/Builder/TestApplicationBuilder.cs:line 102`
Describe the bug
When supplying your own entrypoint, with disabled
GenerateTestingPlatformEntryPoint
, CodeCoverage and MSTest aren't injected into the SelfRegisteredExtensions.Steps To Reproduce
Program.cs:
Fails with:
Expected behavior
AddSelfRegisteredExtensions shouldn't omit TestPlatform registration.
Actual behavior
AddSelfRegisteredExtensions contains additional calls, when enabling
GenerateTestingPlatformEntryPoint
:Versus, when disabling entrypoint generation:
When carbon copying the generated entrypoint code (which this is) there must not be different observed behavior.
Additional context
The text was updated successfully, but these errors were encountered: