How can one verify if a solution's projects require a build? In other words, if a getLatest has been made, if a file has been modified in any way, be it deleted or simply changed, [insert any other reasons for which a project would need to be rebuilt here].
Context
I am in the making of a Visual Studio 2012 package which needs to have this information in order for it to execute project builds when necessary. Needless to say I have access to an EnvDTE.DTE instance.
Here is what I've started with :
public class Searcher
{
private IServiceProvider _serviceProvider;
private EnvDTE80.DTE2 DTE;
public Searcher(IServiceProvider serviceProvider)
{
this._serviceProvider = serviceProvider;
DTE = (EnvDTE80.DTE2)this._serviceProvider.GetService(typeof(DTE));
[...]
}
private List<string> BuildAssembliesAndReturnTheirName()
{
Solution sln = DTE.Solution;
bool isDirty = false;
foreach (Project project in sln.Projects)
{
//I saw that VCProject has an UpToDate property so I figured using VSProject would be my best bet since my package will only support VB or C# projects
VSProject vsProject = (VSProject)project.Object;
//can I get anything concerning the projects "validity" with activeConfiguration?
Configuration activeConfiguration = vsProject.Project.ConfigurationManager.ActiveConfiguration;
}
[...]
}
}I have tried a few things at first such as going through each project to see if they need to be saved only to realise it wouldn't be good enough for my needs.