Ejemplo n.º 1
0
		public static BuildTaskDatabase GetDefaultTaskDatabase (Toolset toolset)
		{
			if (toolset == null)
				throw new ArgumentNullException ("toolset");
			BuildTaskDatabase defaults;
			if (!default_factory.TryGetValue (toolset.ToolsVersion, out defaults)) {
				defaults = new BuildTaskDatabase (toolset);
			}
			return defaults;
		}
Ejemplo n.º 2
0
        public static BuildTaskDatabase GetDefaultTaskDatabase(Toolset toolset)
        {
            if (toolset == null)
            {
                throw new ArgumentNullException("toolset");
            }
            BuildTaskDatabase defaults;

            if (!default_factory.TryGetValue(toolset.ToolsVersion, out defaults))
            {
                defaults = new BuildTaskDatabase(toolset);
            }
            return(defaults);
        }
Ejemplo n.º 3
0
        // FIXME:
        // While we are not faced to implement those features, there are some modern task execution requirements.
        //
        // This will have to be available for "out of process" nodes (see NodeAffinity).
        // NodeAffinity is set per project file at BuildManager.HostServices.
        // When NodeAffinity is set to OutOfProc, it should probably launch different build host
        // that runs separate build tasks. (.NET has MSBuildTaskHost.exe which I guess is about that.)
        //
        // Also note that the complete implementation has to support LoadInSeparateAppDomainAttribute
        // (which is most likely derived from AppDomainIsolatedBuildTask) that marks a task to run
        // in separate AppDomain.
        //
        public void BuildProject(Func <bool> checkCancel, BuildResult result, ProjectInstance project, IEnumerable <string> targetNames, IDictionary <string, string> globalProperties, IDictionary <string, string> targetOutputs, string toolsVersion)
        {
            if (toolsVersion == null)
            {
                throw new ArgumentNullException("toolsVersion");
            }

            var parameters = submission.BuildManager.OngoingBuildParameters;
            var toolset    = parameters.GetToolset(toolsVersion);

            if (toolset == null)
            {
                throw new InvalidOperationException(string.Format("Toolset version '{0}' was not resolved to valid toolset", toolsVersion));
            }
            LogMessageEvent(new BuildMessageEventArgs(string.Format("Using Toolset version {0}.", toolsVersion), null, null, MessageImportance.Low));
            var buildTaskFactory = new BuildTaskFactory(BuildTaskDatabase.GetDefaultTaskDatabase(toolset), new BuildTaskDatabase(this, submission.BuildRequest.ProjectInstance));

            BuildProject(new InternalBuildArguments()
            {
                CheckCancel = checkCancel, Result = result, Project = project, TargetNames = targetNames, GlobalProperties = globalProperties, TargetOutputs = targetOutputs, ToolsVersion = toolsVersion, BuildTaskFactory = buildTaskFactory
            });
        }
Ejemplo n.º 4
0
		public BuildTaskFactory (BuildTaskDatabase builtInDatabase, BuildTaskDatabase perProjectDatabase)
		{
			this.built_in_database = builtInDatabase;
			this.per_project_database = perProjectDatabase;
		}
Ejemplo n.º 5
0
 public BuildTaskFactory(BuildTaskDatabase builtInDatabase, BuildTaskDatabase perProjectDatabase)
 {
     this.built_in_database    = builtInDatabase;
     this.per_project_database = perProjectDatabase;
 }