Esempio n. 1
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
            });
        }
Esempio n. 2
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 });
		}