Continuous integration

Test .NET 6 (Or any Core version) from legacy .NET Framework

I’m currently working on moving a large legacy system from .NET Framework 4.8 to .NET 6. Since this is a large system the move will take years and we need to work iteratively meaning both systems will co-exist over a few years.

This means that integration tests we already have for the legacy system now needs to execute code over two application domains running two completely different CLRs. I ended up making a little service that the legacy code can call to execute code in the new system.

First we create a new web API project with a single controller.

public class TestController : ControllerBase
    private static readonly Dictionary<Guid, IServiceProvider> ServiceProviders = new();

    public bool Get()
        return true;

    public async Task SetupTest(Guid testId, string connectionString)

        var collection = new ServiceCollection();

        var provider = collection
            .AddCqs(configure => collection.AddMassTransitTestHarness(cfg =>
                cfg.UsingInMemory((ctx, mem) =>
            .AddDbContext<PcDbContext>(b =>

        var harness = provider.GetRequiredService<IHarness>();
        await harness.Start();

        ServiceProviders.Add(testId, provider);

    public void TeardownTest(Guid testId)

    private static readonly JsonSerializerOptions Options = new() { PropertyNameCaseInsensitive = true };

    public async Task ExecuteCommand(Guid testId, string cmdType)
        var provider = ServiceProviders[testId];

        var cmd = (await JsonSerializer.DeserializeAsync(HttpContext.Request.Body, Type.GetType(cmdType)!, Options))!;
        await provider.GetRequiredService<IBus>().Publish(cmd);
        await provider.GetRequiredService<IHarness>().WaitForBus();
(more…) changes UI daily

Whats going on with We use it for issue tracking, version control and as a general CI platform. They literary change the UI every week and even daily. It’s very frustrating that you can not be granted to learn the UI and become efficient with it before they change it partially or entirely.

Microsoft, if you read this, continuous delivery is great but changing the UI at this rate is not productive for anyone.

</rant over>