/// <summary> /// Updates the project Id in packageSpec. /// </summary> /// <param name="nuGetProject">NuGetProject containing the project Id.</param> /// <param name="projectUniqueName">Project unique name used to get the package spec from the dgSpec.</param> /// <param name="projectRestoreInfo">DgSpec of containing the packageSpec for the project.</param> private void UpdateProjectIdInPackageSpec(NuGetProject nuGetProject, string projectUniqueName, DependencyGraphSpec projectRestoreInfo) { var packageSpec = projectRestoreInfo.GetProjectSpec(projectUniqueName); if (packageSpec != null && nuGetProject != null && string.IsNullOrEmpty(packageSpec.ProjectId)) { packageSpec.ProjectId = nuGetProject.GetProjectId(); } }