public MSBuildLog(Engine engine)
 {
     ConsoleLogger trace = new Microsoft.Build.BuildEngine.ConsoleLogger(
             LoggerVerbosity.Normal, ConsoleWrite, ColorSetter, ColorResetter
         );
     trace.SkipProjectStartedText = false;
     trace.ShowSummary = false;
     engine.RegisterLogger(trace);
 }
Exemple #2
0
    public MSBuildLog(Engine engine)
    {
        ConsoleLogger trace = new Microsoft.Build.BuildEngine.ConsoleLogger(
            LoggerVerbosity.Normal, ConsoleWrite, ColorSetter, ColorResetter
            );

        trace.SkipProjectStartedText = false;
        trace.ShowSummary            = false;
        engine.RegisterLogger(trace);
    }
Exemple #3
0
        private string InitRuntime(string toolsVersion, string frameworkDir, bool hardReferences)
        {
            _items        = new ItemLookup();
            _toolsVersion = toolsVersion;
            _engine       = new Engine(frameworkDir);

            Log.Verbose("Using build engine: {0}", _engine.GetType().Assembly.FullName);
            string version = _engine.GetType().Assembly.GetName().Version.ToString(2);

            Is35 = version == "3.5";

            if (hardReferences)
            {
                _engine.GlobalProperties.SetProperty("AssemblySearchPaths", "{HintPathFromItem}");
                //{CandidateAssemblyFiles}
                //{HintPathFromItem}
                //{TargetFrameworkDirectory}
                //{Registry:Software\Microsoft\.NetFramework,v2.0,AssemblyFoldersEx}
                //{AssemblyFolders}
                //{GAC}
                //{RawFileName}
                //$(OutputPath)

                _engine.GlobalProperties.SetProperty("NoStdLib", true.ToString());
            }
            if (!Is35)
            {
                _engine.GlobalProperties.SetProperty("MSBuildToolsPath", frameworkDir);
            }

            ConsoleLogger trace = new Microsoft.Build.BuildEngine.ConsoleLogger(
                LoggerVerbosity.Minimal, ConsoleWrite, ColorSetter, ColorResetter
                );

            trace.SkipProjectStartedText = false;
            trace.ShowSummary            = false;
            _engine.RegisterLogger(trace);

            return(version);
        }
        private string InitRuntime(string toolsVersion, string frameworkDir, bool hardReferences)
		{
			_items = new ItemLookup();
			_toolsVersion = toolsVersion;
			_engine = new Engine( frameworkDir );

			Log.Verbose("Using build engine: {0}", _engine.GetType().Assembly.FullName);
			string version = _engine.GetType().Assembly.GetName().Version.ToString(2);
			Is35 = version == "3.5";

            if (hardReferences)
            {
                _engine.GlobalProperties.SetProperty("AssemblySearchPaths", "{HintPathFromItem}");
                //{CandidateAssemblyFiles}
                //{HintPathFromItem}
                //{TargetFrameworkDirectory}
                //{Registry:Software\Microsoft\.NetFramework,v2.0,AssemblyFoldersEx}
                //{AssemblyFolders}
                //{GAC}
                //{RawFileName}
                //$(OutputPath)

                _engine.GlobalProperties.SetProperty("NoStdLib", true.ToString());
            }
			if( !Is35 )
				_engine.GlobalProperties.SetProperty("MSBuildToolsPath", frameworkDir);

			ConsoleLogger trace = new Microsoft.Build.BuildEngine.ConsoleLogger(
					LoggerVerbosity.Minimal, ConsoleWrite, ColorSetter, ColorResetter
				);
			trace.SkipProjectStartedText = false;
			trace.ShowSummary = false;
			_engine.RegisterLogger(trace);

			return version;
		}