diff --git a/src/LeanCode.ContractsGenerator/Compilation/ProjectLoader.cs b/src/LeanCode.ContractsGenerator/Compilation/ProjectLoader.cs index 129890c..4e3b15c 100644 --- a/src/LeanCode.ContractsGenerator/Compilation/ProjectLoader.cs +++ b/src/LeanCode.ContractsGenerator/Compilation/ProjectLoader.cs @@ -30,8 +30,10 @@ await Console.Error.WriteLineAsync( foreach (var projectPath in projectPathsList) { if (msbuildWorkspace.CurrentSolution.Projects - .Where(p => p.FilePath is not null) - .Any(p => ResolveCanonicalPath(p.FilePath) == projectPath)) + .Select(p => p.FilePath) + .OfType() + .Select(ResolveCanonicalPath) + .Contains(projectPath)) { continue; }