private void SetAvailableConfigurations() { foreach (SolutionConfiguration2 solutionConfiguration in GetSolutionConfigurations()) { string solutionConfigurationName = solutionConfiguration.Name; string solutionPlatformName = solutionConfiguration.PlatformName; if (!AvailableSolutionConfigurations.Contains(solutionConfigurationName)) { AvailableSolutionConfigurations.Add(solutionConfigurationName); } if (!AvailableSolutionPlatforms.Contains(solutionPlatformName)) { AvailableSolutionPlatforms.Add(solutionPlatformName); } } }
public DesignTimeConfigurationManager() { IsSolutionAvailable = true; AvailableSolutionConfigurations.Add("Debug"); AvailableSolutionPlatforms.Add("Any CPU"); ActiveSolutionConfiguration = "Debug"; ActiveSolutionPlatform = "Any CPU"; ShowStatusText = true; StatusText = "Loading..."; var firstProject = new Project { Name = "Namespace.FirstProject" }; firstProject.ActiveConfiguration = new Configuration { ProjectConfiguration = "Debug", AvailableProjectConfigurations = new[] { "Debug" }, ProjectPlatform = "Any CPU", AvailableProjectPlatforms = new[] { "Any CPU" }, IsDeployable = false, IsBuildable = true, ShouldBuild = true, ShouldDeploy = false }; Projects.Add(firstProject); var secondProject = new Project { Name = "Namespace.SecondProject" }; secondProject.ActiveConfiguration = new Configuration { ProjectConfiguration = "Debug", AvailableProjectConfigurations = new[] { "Debug" }, ProjectPlatform = "x86", AvailableProjectPlatforms = new[] { "x86" }, IsDeployable = true, IsBuildable = true, ShouldBuild = true, ShouldDeploy = true }; Projects.Add(secondProject); }