Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ internal interface IProjectFileUpdater : IVersionConverter<AssemblyInfoContext>;
internal sealed class ProjectFileUpdater(ILog log, IFileSystem fileSystem) : IProjectFileUpdater
{
internal const string AssemblyVersionElement = "AssemblyVersion";

private const int DefaultMaxRecursionDepth = 255;
private const string FileVersionElement = "FileVersion";
private const string InformationalVersionElement = "InformationalVersion";
private const string VersionElement = "Version";
Expand Down Expand Up @@ -190,11 +192,18 @@ private IEnumerable<IFileInfo> GetProjectFiles(AssemblyInfoContext context)
}
else
{
foreach (var item in fileSystem.Directory.EnumerateFiles(workingDirectory, "*", SearchOption.AllDirectories).Where(IsSupportedProjectFile))
var options = new EnumerationOptions
{
var assemblyInfoFile = fileSystem.FileInfo.New(item);

yield return assemblyInfoFile;
RecurseSubdirectories = true,
MaxRecursionDepth = DefaultMaxRecursionDepth
};
var projectFiles = fileSystem.Directory
.EnumerateFiles(workingDirectory, "*proj", options)
.Where(IsSupportedProjectFile);

foreach (var projectFile in projectFiles)
{
yield return fileSystem.FileInfo.New(projectFile);
}
}
}
Expand Down