Quantcast
Channel: Build Version Increment Add-In Visual Studio
Viewing all articles
Browse latest Browse all 131

Created Issue: Error in 'Project Modified' Calculation: Doesn't Traverse All Folders [8615]

$
0
0
The calculation of "if a project is modified" only looks at root items or items that are in a sub-folder. It does not appropriately look at items within a folder within a folder. I propose modifying the IsProjectModified function to call a recursive function CheckProjectItemsModified with the call
```
if (CheckProjectItemsModified(project.ProjectItems, project, GetCachedFileDate(outputFileName, fullPath))) return true;
```
and the function definition
```
private bool CheckProjectItemsModified(ProjectItems items, Project project, DateTime outputFileDate)
{
foreach (ProjectItem item in items)
{
// PhysicalFolder
// VirtualFolder
if (item.Kind == "{6BB5F8EF-4483-11D3-8BCF-00C04F8EC28C}" ||
item.Kind == "{6BB5F8F0-4483-11D3-8BCF-00C04F8EC28C}")
{
if (CheckProjectItemsModified(item.ProjectItems, project, outputFileDate)) return true;
}
else if (CheckProjectItem(item, outputFileDate))
{
Logger.Write(String.Format("Project's ('{0}') item '{1}' is modified. Version will be updated.", project.Name, item.Name), LogLevel.Debug);
return true;
}
}
return false;
}
```

Viewing all articles
Browse latest Browse all 131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>