string GetAssemblyFileNameFromHintPath(Microsoft.Build.Evaluation.Project p, Microsoft.Build.Evaluation.ProjectItem item) { string assemblyFileName = null; if (item.HasMetadata("HintPath")) { assemblyFileName = _fileSystem.Path.Combine(p.DirectoryPath, item.GetMetadataValue("HintPath")).ForceNativePathSeparator(); _logger.Info("Looking for assembly from HintPath at " + assemblyFileName); if (!_fileSystem.File.Exists(assemblyFileName)) { _logger.Info("Did not find assembly from HintPath"); assemblyFileName = null; } } return assemblyFileName; }
public bool IsActiveConfiguration(Microsoft.Build.BuildEngine.BuildItem item) { return IsConfiguration(item) && item.HasMetadata("Active") && item.GetMetadata("Active").Equals("true"); }
public bool IsConfiguration(Microsoft.Build.BuildEngine.BuildItem bi) { return bi.HasMetadata("Type") && bi.GetMetadata("Type").Equals("Config"); }
public void InsertItem(Microsoft.Build.BuildEngine.BuildItem item) { if (item.HasMetadata("Type")) { string type = item.GetMetadata("Type"); switch (type) { case "Config": InsertConfigItem(item); break; case "Assembly": InsertMappingAssembly(item); break; case "Mapping": InsertMappingFile(item); break; } } }