Description
The message I got in VS IDE is:

This is not private ctor, but public.
And also this private class is used.
Repro steps
This is the code example
public class TagDto
{
public int Id { get; set; }
public string? Name { get; set; }
public bool System { get; set; }
public bool Active { get; set; }
public DateTime? SynchronizedOn { get; set; }
private class Mapping : Profile
{
public Mapping()
{
CreateMap<Tag, TagDto>();
}
}
}
And this is used as
.ProjectTo<TagDto>(_mapper.ConfigurationProvider),
Related information
- C#/VB.NET Plugins version: SonarAnalyzer.CSharp Version 9.7.0.75501
- Visual Studio version: Version 17.7.0 Preview 5.0
- MSBuild / dotnet version: .NET 8 Preview 5
- Operating System: Windows