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>;
12
12
internal sealed class ProjectFileUpdater ( ILog log , IFileSystem fileSystem ) : IProjectFileUpdater
13
13
{
14
14
internal const string AssemblyVersionElement = "AssemblyVersion" ;
15
+
16
+ private const int DefaultMaxRecursionDepth = 255 ;
15
17
private const string FileVersionElement = "FileVersion" ;
16
18
private const string InformationalVersionElement = "InformationalVersion" ;
17
19
private const string VersionElement = "Version" ;
@@ -190,11 +192,18 @@ private IEnumerable<IFileInfo> GetProjectFiles(AssemblyInfoContext context)
190
192
}
191
193
else
192
194
{
193
- foreach ( var item in fileSystem . Directory . EnumerateFiles ( workingDirectory , "*" , SearchOption . AllDirectories ) . Where ( IsSupportedProjectFile ) )
195
+ var options = new EnumerationOptions
194
196
{
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 ) ;
198
207
}
199
208
}
200
209
}
You can’t perform that action at this time.
0 commit comments