internal protected override void Read(IMSBuildEvaluatedPropertyCollection pset, string toolsVersion) { base.Read(pset, toolsVersion); assembly = pset.GetValue("AssemblyName"); signAssembly = pset.GetValue <bool> ("SignAssembly"); delaySign = pset.GetValue <bool> ("DelaySign"); assemblyKeyFile = pset.GetPathValue("AssemblyOriginatorKeyFile", FilePath.Empty); if (string.IsNullOrEmpty(assemblyKeyFile)) { assemblyKeyFile = pset.GetPathValue("AssemblyKeyFile", FilePath.Empty); } if (compilationParameters != null) { compilationParameters.Read(pset, toolsVersion); } }
internal protected virtual void Read(IMSBuildEvaluatedPropertyCollection pset, string toolsVersion) { evaluatedProperties = pset; intermediateOutputDirectory = pset.GetPathValue("IntermediateOutputPath"); outputDirectory = pset.GetPathValue("OutputPath", defaultValue: "." + Path.DirectorySeparatorChar); debugMode = pset.GetValue <bool> ("DebugSymbols", false); pauseConsoleOutput = pset.GetValue("ConsolePause", true); externalConsole = pset.GetValue <bool> ("ExternalConsole"); commandLineParameters = pset.GetValue("Commandlineparameters", ""); runWithWarnings = pset.GetValue("RunWithWarnings", true); // Special case: when DebugType=none, xbuild returns an empty string debugType = pset.GetValue("DebugType"); if (string.IsNullOrEmpty(debugType)) { debugType = "none"; debugTypeReadAsEmpty = true; } debugTypeWasNone = debugType == "none"; var svars = pset.GetValue("EnvironmentVariables"); ParseEnvironmentVariables(svars, environmentVariables); // Kep a clone of the loaded env vars, so we can check if they have changed when saving loadedEnvironmentVariables = new Dictionary <string, string> (environmentVariables); pset.ReadObjectProperties(this, GetType(), true); }
internal protected virtual void Read (IMSBuildEvaluatedPropertyCollection pset, string toolsVersion) { evaluatedProperties = pset; intermediateOutputDirectory = pset.GetPathValue ("IntermediateOutputPath"); outputDirectory = pset.GetPathValue ("OutputPath", defaultValue:"." + Path.DirectorySeparatorChar); debugMode = pset.GetValue<bool> ("DebugSymbols", false); pauseConsoleOutput = pset.GetValue ("ConsolePause", true); externalConsole = pset.GetValue<bool> ("ExternalConsole"); commandLineParameters = pset.GetValue ("Commandlineparameters", ""); runWithWarnings = pset.GetValue ("RunWithWarnings", true); // Special case: when DebugType=none, xbuild returns an empty string debugType = pset.GetValue ("DebugType"); if (string.IsNullOrEmpty (debugType)) { debugType = "none"; debugTypeReadAsEmpty = true; } debugTypeWasNone = debugType == "none"; var svars = pset.GetValue ("EnvironmentVariables"); ParseEnvironmentVariables (svars, environmentVariables); // Kep a clone of the loaded env vars, so we can check if they have changed when saving loadedEnvironmentVariables = new Dictionary<string, string> (environmentVariables); pset.ReadObjectProperties (this, GetType (), true); }
// Internal for testing internal static bool TryGetDefaultConfiguration(IMSBuildEvaluatedPropertyCollection projectProperties, out string defaultConfiguration) { defaultConfiguration = projectProperties.GetValue(RazorDefaultConfigurationProperty); if (string.IsNullOrEmpty(defaultConfiguration)) { defaultConfiguration = null; return(false); } return(true); }
// Internal for testing internal static bool TryGetRootNamespace(IMSBuildEvaluatedPropertyCollection projectProperties, out string rootNamespace) { rootNamespace = projectProperties.GetValue(RootNamespaceProperty); if (string.IsNullOrEmpty(rootNamespace)) { rootNamespace = null; return false; } return true; }
// Internal for testing internal static bool TryGetLanguageVersion(IMSBuildEvaluatedPropertyCollection projectProperties, out RazorLanguageVersion languageVersion) { var languageVersionValue = projectProperties.GetValue(RazorLangVersionProperty); if (string.IsNullOrEmpty(languageVersionValue)) { languageVersion = null; return false; } if (!RazorLanguageVersion.TryParse(languageVersionValue, out languageVersion)) { languageVersion = RazorLanguageVersion.Latest; } return true; }
protected override void Read(IMSBuildEvaluatedPropertyCollection pset, string toolsVersion) { base.Read(pset, toolsVersion); var prop = pset.GetProperty("GenerateDocumentation"); if (prop != null && documentationFile != null) { if (prop.GetValue <bool> ()) { documentationFile = ParentConfiguration.CompiledOutputName.ChangeExtension(".xml"); } else { documentationFile = null; } } optimize = pset.GetValue("Optimize", (bool?)null); }
protected override void Read (IMSBuildEvaluatedPropertyCollection pset, string toolsVersion) { base.Read (pset, toolsVersion); var prop = pset.GetProperty ("GenerateDocumentation"); if (prop != null && documentationFile != null) { if (prop.GetValue<bool> ()) documentationFile = ParentConfiguration.CompiledOutputName.ChangeExtension (".xml"); else documentationFile = null; } optimize = pset.GetValue ("Optimize", (bool?)null); }