File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
src/GitVersion.Output/AssemblyInfo Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ internal interface IProjectFileUpdater : IVersionConverter<AssemblyInfoContext>;
1212internal sealed class ProjectFileUpdater ( ILog log , IFileSystem fileSystem ) : IProjectFileUpdater
1313{
1414 internal const string AssemblyVersionElement = "AssemblyVersion" ;
15+
16+ private const int DefaultMaxRecursionDepth = 255 ;
1517 private const string FileVersionElement = "FileVersion" ;
1618 private const string InformationalVersionElement = "InformationalVersion" ;
1719 private const string VersionElement = "Version" ;
@@ -190,11 +192,18 @@ private IEnumerable<IFileInfo> GetProjectFiles(AssemblyInfoContext context)
190192 }
191193 else
192194 {
193- foreach ( var item in fileSystem . Directory . EnumerateFiles ( workingDirectory , "*" , SearchOption . AllDirectories ) . Where ( IsSupportedProjectFile ) )
195+ var options = new EnumerationOptions
194196 {
195- var assemblyInfoFile = fileSystem . FileInfo . New ( item ) ;
196-
197- yield return assemblyInfoFile ;
197+ RecurseSubdirectories = true ,
198+ MaxRecursionDepth = DefaultMaxRecursionDepth
199+ } ;
200+ var projectFiles = fileSystem . Directory
201+ . EnumerateFiles ( workingDirectory , "*proj" , options )
202+ . Where ( IsSupportedProjectFile ) ;
203+
204+ foreach ( var projectFile in projectFiles )
205+ {
206+ yield return fileSystem . FileInfo . New ( projectFile ) ;
198207 }
199208 }
200209 }
You can’t perform that action at this time.
0 commit comments