After upgrading to Moq.AutoMocker 3.6.1, I got the following error in the AutoMocker generated code:
The call is ambiguous between the following methods or properties:
'Moq.AutoMock.AutoMockerKeyedServicesExtensions.WithKeyedService<TService, TImplementation>(Moq.AutoMock.AutoMocker, TImplementation, object?)'
and
'Moq.AutoMock.AutoMockerKeyedServicesExtensions.WithKeyedService<TService, TImplementation>(Moq.AutoMock.AutoMocker, TImplementation, object?)'
In File AutoMockerKeyedServicesExtensions.g.cs
In the source code, I found a test related to this feature flag that validate if the method should be created or not:
EnableMoqAutoMockerKeyedServicesGenerator
Trying to disable it by adding the following to my csproj doesn't work
<PropertyGroup>
<EnableMoqAutoMockerKeyedServicesGenerator>false</EnableMoqAutoMockerKeyedServicesGenerator>
</PropertyGroup>