예제 #1
0
        /// <summary>
        /// Factory for deserialization.
        /// </summary>
        internal static ToolsetProvider FactoryForDeserialization(ITranslator translator)
        {
            ToolsetProvider provider = new ToolsetProvider(translator);

            return(provider);
        }
예제 #2
0
        /// <summary>
        /// Loads the toolsets if we don't have them already.
        /// </summary>
        private void EnsureToolsets()
        {
            if (_toolsetProvider != null)
            {
                return;
            }

            _toolsetProvider = new ToolsetProvider(DefaultToolsVersion, _environmentProperties, _globalProperties, ToolsetDefinitionLocations);
        }
예제 #3
0
        /// <summary>
        /// Centralization of the common parts of construction.
        /// </summary>
        private void Initialize(PropertyDictionary<ProjectPropertyInstance> environmentProperties, ProjectRootElementCache projectRootElementCache, ToolsetProvider toolsetProvider)
        {
            _buildProcessEnvironment = CommunicationsUtilities.GetEnvironmentVariables();
            _environmentProperties = environmentProperties;
            this.ProjectRootElementCache = projectRootElementCache;
            this.ResetCaches = true;
            _toolsetProvider = toolsetProvider;

            if (Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1") // For example to disable node reuse within Visual Studio
            {
                _enableNodeReuse = false;
            }

            if (Environment.GetEnvironmentVariable("MSBUILDDETAILEDSUMMARY") == "1") // For example to get detailed summary within Visual Studio
            {
                _detailedSummary = true;
            }

            FindMSBuildExe();
        }
예제 #4
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        private BuildParameters(BuildParameters other)
        {
            ErrorUtilities.VerifyThrowInternalNull(other, "other");

            _buildId = other._buildId;
            _culture = other._culture;
            _defaultToolsVersion = other._defaultToolsVersion;
            _enableNodeReuse = other._enableNodeReuse;
            _buildProcessEnvironment = other._buildProcessEnvironment != null ? new Dictionary<string, string>(other._buildProcessEnvironment) : null;
            _environmentProperties = other._environmentProperties != null ? new PropertyDictionary<ProjectPropertyInstance>(other._environmentProperties) : null;
            _forwardingLoggers = other._forwardingLoggers != null ? new List<ForwardingLoggerRecord>(other._forwardingLoggers) : null;
            _globalProperties = other._globalProperties != null ? new PropertyDictionary<ProjectPropertyInstance>(other._globalProperties) : null;
            _hostServices = other._hostServices;
            _loggers = other._loggers != null ? new List<ILogger>(other._loggers) : null;
            _maxNodeCount = other._maxNodeCount;
            _memoryUseLimit = other._memoryUseLimit;
            _nodeExeLocation = other._nodeExeLocation;
            _nodeId = other._nodeId;
            _onlyLogCriticalEvents = other._onlyLogCriticalEvents;
            _buildThreadPriority = other._buildThreadPriority;
            _toolsetProvider = other._toolsetProvider;
            _toolsetDefinitionLocations = other._toolsetDefinitionLocations;
            _toolsetProvider = other._toolsetProvider;
            _uiCulture = other._uiCulture;
            _detailedSummary = other._detailedSummary;
            _shutdownInProcNodeOnBuildFinish = other._shutdownInProcNodeOnBuildFinish;
            this.ProjectRootElementCache = other.ProjectRootElementCache;
            this.ResetCaches = other.ResetCaches;
            this.LegacyThreadingSemantics = other.LegacyThreadingSemantics;
            _saveOperatingEnvironment = other._saveOperatingEnvironment;
            _useSynchronousLogging = other._useSynchronousLogging;
            _disableInProcNode = other._disableInProcNode;
            _logTaskInputs = other._logTaskInputs;
            _logInitialPropertiesAndItems = other._logInitialPropertiesAndItems;
        }
예제 #5
0
        /// <summary>
        /// Factory for deserialization.
        /// </summary>
        static internal ToolsetProvider FactoryForDeserialization(INodePacketTranslator translator)
        {
            ToolsetProvider provider = new ToolsetProvider(translator);

            return(provider);
        }
예제 #6
0
 /// <summary>
 /// Factory for deserialization.
 /// </summary>
 static internal ToolsetProvider FactoryForDeserialization(INodePacketTranslator translator)
 {
     ToolsetProvider provider = new ToolsetProvider(translator);
     return provider;
 }