The generator and analyzers referenced Microsoft.CodeAnalysis 5.6.0, which
ships with the .NET 10.0.30x SDK. Roslyn refuses to load a component that
references a newer compiler than the host (CS9057), so every older host
silently skipped them: no generated members, and 'Cannot resolve symbol
CreateMock' throughout the IDE while the command-line build stayed green.
Pin the three shipped components to the oldest Roslyn they actually need.
5.0 is the floor, not lower: the emitted Mock.g.cs declares CreateMock in a
C# 14 extension block, so a C# 13 host parses it as garbage and generates no
mocks at all. That also rules out any pre-C# 14 host, since a static
extension member has no older equivalent.
Mockolate.SourceGenerators.Tests pins the same version, so reaching for a
newer Roslyn API fails the build and the generator tests here rather than
silently breaking consumers' IDEs.
MinimumRoslynVersion sits in the root Directory.Build.props because the test
tree imports that one but not Source/Directory.Build.props.
The generator and analyzers referenced Microsoft.CodeAnalysis 5.6.0, which ships with the .NET 10.0.30x SDK. Roslyn refuses to load a component that references a newer compiler than the host (CS9057), so every older host silently skipped them: no generated members, and 'Cannot resolve symbol CreateMock' throughout the IDE while the command-line build stayed green.
Pin the three shipped components to the oldest Roslyn they actually need. 5.0 is the floor, not lower: the emitted Mock.g.cs declares CreateMock in a C# 14 extension block, so a C# 13 host parses it as garbage and generates no mocks at all. That also rules out any pre-C# 14 host, since a static extension member has no older equivalent.
Mockolate.SourceGenerators.Tests pins the same version, so reaching for a newer Roslyn API fails the build and the generator tests here rather than silently breaking consumers' IDEs.
MinimumRoslynVersion sits in the root Directory.Build.props because the test tree imports that one but not Source/Directory.Build.props.