diff --git a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs index f97c988..a91da93 100644 --- a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs +++ b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/VsPersistenceMapper.cs @@ -12,7 +12,10 @@ public static class VsPersistenceMapper var intermediateModel = await IntermediateMapper.GetIntermediateModel(solutionFilePath, cancellationToken); var solutionModel = new SharpIdeSolutionModel(solutionFilePath, intermediateModel); - using var repo = new Repository(solutionModel.DirectoryPath); + + var gitFolderPath = Repository.Discover(solutionFilePath); + if (gitFolderPath is null) return solutionModel; + using var repo = new Repository(gitFolderPath); var status = repo.RetrieveStatus(new StatusOptions()); foreach (var entry in status.Where(s => s.State is not FileStatus.Ignored))