Skip to content

Commit

Permalink
call GetProject only once in AggregateComamndLineItemsForProject
Browse files Browse the repository at this point in the history
  • Loading branch information
Irame committed Sep 8, 2023
1 parent e0ec99b commit 822660a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SmartCmdArgs/SmartCmdArgs.Shared/CmdArgsPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,14 @@ private TResult AggregateComamndLineItemsForProject<TResult>(IVsHierarchy projec
if (projectCmd == null)
return default;

string projConfig = project.GetProject()?.ConfigurationManager?.ActiveConfiguration?.ConfigurationName;
string projPlatform = project.GetProject()?.ConfigurationManager?.ActiveConfiguration?.PlatformName;
var projectObj = project.GetProject();

string projConfig = projectObj?.ConfigurationManager?.ActiveConfiguration?.ConfigurationName;
string projPlatform = projectObj?.ConfigurationManager?.ActiveConfiguration?.PlatformName;

string activeLaunchProfile = null;
if (project.IsCpsProject())
activeLaunchProfile = CpsProjectSupport.GetActiveLaunchProfileName(project.GetProject());
activeLaunchProfile = CpsProjectSupport.GetActiveLaunchProfileName(projectObj);

TResult JoinContainer(CmdContainer con)
{
Expand Down

0 comments on commit 822660a

Please sign in to comment.