Microsoft.VisualStudio.Project.SolutionListenerForBuildDependencyUpdate.AddBuildDependenyToNestedProject C# (CSharp) Method

AddBuildDependenyToNestedProject() protected static method

Add build dependency to ProjectContainerNode if IVsBuildDependency is supported by the nested project
protected static AddBuildDependenyToNestedProject ( IBuildDependencyUpdate projectContainer, IVsHierarchy nestedProject ) : void
projectContainer IBuildDependencyUpdate Project Container where we should add the build dependency
nestedProject IVsHierarchy Nested project to set a build dependency against
return void
        protected static void AddBuildDependenyToNestedProject(IBuildDependencyUpdate projectContainer, IVsHierarchy nestedProject)
        {
            // Validate input
            Debug.Assert(projectContainer != null, "Project Container must not be null");
            Debug.Assert(nestedProject != null, "Nested Project must not be null");
            if(projectContainer == null || nestedProject == null)
            {
                // Invalid argument
                return;
            }

            // Create new NestedProjectBuildDependency
            NestedProjectBuildDependency dependency = new NestedProjectBuildDependency(nestedProject);
            projectContainer.AddBuildDependency(dependency);
        }