public static void OrganizeManifest(this Manifest spec, NuspecDefinition definition) { switch (definition.TypeOfPackage) { case PackageType.Web: break; default: spec.Files .Where(s => s.Target.StartsWith("lib")) .ToList() .ForEach(f => spec.Files.Remove(f)); break; } }
public Creator(string settingsJson) { var settings = Settings.Load(settingsJson); if (string.IsNullOrEmpty(settings.PathToAssembly)) { throw new FileNotFoundException("no file to analyze: " + settings.PathToAssembly); } _settings = settings; NuspecDefinition = new NuspecDefinition(Path.Combine(settings.ProjectPath, "nuspec-def.xml"), settings.OutputPath); _hasAssembly = File.Exists(settings.PathToAssembly); if (_hasAssembly) { _assembly = Assembly.LoadFile(settings.PathToAssembly); } _outputPath = settings.OutputPath; }