System Information (please complete the following information):
- OS & Version: Windows 11 v10.0.22621.963
- ML.NET Version: ML.NET v2.0
- .NET Version: .NET 7
Describe the bug
After successfully building the ML.NET project when I try to build it again in Visual Studio, I get the "Type parameter name 'TType' not standard" error and the build fails.
To Reproduce
Steps to reproduce the behavior:
- Clone this repo
- Run the
build.cmd in PowerShell
- Open the
Microsoft.ML.sln solution in Visual Studio 2022
- Try to build the project (F6)
- (optional) Open a source file that causes the failure (eg. NormalizeColumnSng.cs)
- See the errors in the Error List window
Expected behavior
As described in this document, I would expect the build command to work in Visual Studio.
Screenshots, Code, Sample Projects

Additional context
I use Visual Studio Enterprise 2022 v17.4.3.
If I refactor the type TType to TTest then it works fine.
I also tried to keep the TType class name, and change the condition in TypeParamNameAnalyzer class from
if (name == null || (name.StartsWith("T") && Utils.NameIsGood(name, 1, true))) return;
to
if (name == null || (true && Utils.NameIsGood(name, 1, true))) return;
and it made it work, I could build the solution without any errors.
It doesn't make any sense to me, I hope someone else will understand what's the underlying issue here.
System Information (please complete the following information):
Describe the bug
After successfully building the ML.NET project when I try to build it again in Visual Studio, I get the "Type parameter name 'TType' not standard" error and the build fails.
To Reproduce
Steps to reproduce the behavior:
build.cmdin PowerShellMicrosoft.ML.slnsolution in Visual Studio 2022Expected behavior
As described in this document, I would expect the build command to work in Visual Studio.
Screenshots, Code, Sample Projects

Additional context
I use Visual Studio Enterprise 2022 v17.4.3.
If I refactor the type
TTypetoTTestthen it works fine.I also tried to keep the
TTypeclass name, and change the condition inTypeParamNameAnalyzerclass fromto
and it made it work, I could build the solution without any errors.
It doesn't make any sense to me, I hope someone else will understand what's the underlying issue here.