I am creating a Visual studio add-in writing in C# allowing users to send their code to a remote PC for parsing. The process will differ depending on what Active Solution Platform is being used.
I would like the add-in to be able to obtain the current Active Solution Platform so the users code can be processed correctly.
I tried the following:
try
{
SolutionBuild builder = applicationObject.Solution.SolutionBuild;
SolutionConfiguration2 config;
config = (SolutionConfiguration2)builder.SolutionConfigurations.Item(1);
MessageBox.Show("The platform name of
the solution configuration is: " + config.PlatformName);
}
catch(SystemException ex)
{
MessageBox.Show(ex.ToString());
}
However this always returns the first Platform in the list, not the current platform.
This will get the configuration name and platform name for the active project.