MonoDevelop.Projects.Formats.MSBuild.BuildEngine.InitializeEngine C# (CSharp) Method

InitializeEngine() static private method

static private InitializeEngine ( string slnFile ) : Engine
slnFile string
return Engine
		static Engine InitializeEngine (string slnFile)
		{
			var engine = new Engine ();
			engine.DefaultToolsVersion = MSBuildConsts.Version;
			var gp = engine.GlobalProperties;

			//this causes build targets to behave how they should inside an IDE, instead of in a command-line process
			gp.SetProperty ("BuildingInsideVisualStudio", "true");

			//we don't have host compilers in MD, and this is set to true by some of the MS targets
			//which causes it to always run the CoreCompile task if BuildingInsideVisualStudio is also
			//true, because the VS in-process compiler would take care of the deps tracking
			gp.SetProperty ("UseHostCompilerIfAvailable", "false");

			if (string.IsNullOrEmpty (slnFile))
				return engine;

			gp.SetProperty ("SolutionPath", Path.GetFullPath (slnFile));
			gp.SetProperty ("SolutionName", Path.GetFileNameWithoutExtension (slnFile));
			gp.SetProperty ("SolutionFilename", Path.GetFileName (slnFile));
			gp.SetProperty ("SolutionDir", Path.GetDirectoryName (slnFile) + Path.DirectorySeparatorChar);

			return engine;
		}

Same methods

BuildEngine::InitializeEngine ( string slnFile ) : Microsoft.Build.Evaluation.ProjectCollection