private void AddProjectInternal(Type projectType, ITarget projectTarget, bool inactiveProject, string solutionFolder, string callerInfo) { IncludedProjectInfo includedProjectInfo = GetProject(projectType); if (includedProjectInfo == null) { IncludedProjectInfos.Add( new IncludedProjectInfo { Type = projectType, Target = projectTarget, InactiveProject = inactiveProject, SolutionFolder = solutionFolder } ); } else { if (!includedProjectInfo.Target.IsEqualTo(projectTarget)) { throw new Error(callerInfo + "error : cannot add twice the project({0}) in the same solution({1}) configuration({2}) using differents project configuration: ({3}) and ({4})", includedProjectInfo.Type.Name, Solution.Name, Target, includedProjectInfo.Target, projectTarget); } } }
public void SetStartupProject <TPROJECTTYPE>( [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) { IncludedProjectInfo includedProjectInfo = GetProject(typeof(TPROJECTTYPE)); if (includedProjectInfo == null) { throw new Error(string.Format("{0} error : Can't set project {1} as startup project of solution {2} and target {3} since it is not included in the configuration.", Util.FormatCallerInfo(sourceFilePath, sourceLineNumber), typeof(TPROJECTTYPE).Name, Solution.Name, Target)); } StartupProject = includedProjectInfo; }