anchor.diff:            Contents = CompleteInfo(core, { opt with Dependencies = newDeps }) }
       | IncompleteTemplate -> 
           failwith "You should only try to add dependencies to template files with complete metadata."
  +
  +let excludeDependency (templateFile : TemplateFile) (exclude : PackageName) = 
  +    match templateFile with
  +    | CompleteTemplate(core, opt) -> 
  +        let newExcludes = 
  +            opt.ExcludedDependencies |> Set.add exclude
  +        { FileName = templateFile.FileName
  +          Contents = CompleteInfo(core, { opt with ExcludedDependencies = newExcludes }) }
  +    | IncompleteTemplate -> 
  +        failwith "You should only try to exclude dependencies to template files with complete metadata."
   
   let toFile config platform (p : ProjectFile) = 
       Path.Combine(Path.GetDirectoryName p.FileName, p.GetOutputDirectory config platform, p.GetAssemblyName())
  
positive.code: 
          additionalFiles
          |> Array.fold (fun template file -> addFile file.FullName targetDir template) template
      
      // If project refs will also be packaged, add dependency
      let withDeps = 
  
negative.code:                     group.Packages |> List.exists (fun p -> p.Name = settings.Name) ||
                        isDependencyOfAnyOtherDependency settings.Name |> not)
          |> List.sortByDescending (fun (group, settings) -> settings.Name)
      
      match refs with
      | [] -> withDepsAndIncluded
      | _ -> 
  