private ProcessNuspec ( PackageBuilder builder, string basePath ) : Manifest | ||
builder | PackageBuilder | |
basePath | string | |
return | Manifest |
private PackageDependency CreateDependencyFromProject(Project project) { try { var projectFactory = new ProjectFactory(project); projectFactory.Build = Build; projectFactory.ProjectProperties = ProjectProperties; projectFactory.BuildProject(); var builder = new PackageBuilder(); try { AssemblyMetadataExtractor.ExtractMetadata(builder, projectFactory.TargetPath); } catch { projectFactory.ExtractMetadataFromProject(builder); } projectFactory.InitializeProperties(builder); projectFactory.ProcessNuspec(builder, null); return(new PackageDependency( builder.Id, VersionUtility.ParseVersionSpec(builder.Version.ToString()))); } catch (Exception ex) { var message = string.Format( CultureInfo.InvariantCulture, NuGetResources.Error_ProcessingNuspecFile, project.FullPath, ex.Message); throw new CommandLineException(message, ex); } }
private PackageDependency CreateDependencyFromProject(Project project) { try { var projectFactory = new ProjectFactory(project); projectFactory.Build = Build; projectFactory.ProjectProperties = ProjectProperties; projectFactory.BaseTargetPath = BaseTargetPath; projectFactory.SolutionName = SolutionName; projectFactory.BuildProject(); var builder = new PackageBuilder(); try { AssemblyMetadataExtractor.ExtractMetadata(builder, projectFactory.TargetPath); } catch { projectFactory.ExtractMetadataFromProject(builder); } projectFactory.InitializeProperties(builder); projectFactory.ProcessNuspec(builder, null); return new PackageDependency( builder.Id, VersionUtility.ParseVersionSpec(builder.Version.ToString())); } catch (Exception ex) { var message = string.Format( CultureInfo.InvariantCulture, LocalizedResourceManager.GetString("Error_ProcessingNuspecFile"), project.FullPath, ex.Message); throw new CommandLineException(message, ex); } }