JoelHT-Landmark / NuGet-PackageNPublish

Project template and packaging targets file to allow easier Package'n'Publish integration with TFS (or other CI) builds.
Other
13 stars 12 forks source link

Nuspec template should not include packages with developmentDependency="true" #18

Closed JoelHT-Landmark closed 8 years ago

JoelHT-Landmark commented 10 years ago

Currently the nuspec template only suppresses packages with name starting "NuGet.".

If it could suppress packages where developmentDependency="true", then it would cater for more general development dependencies that shouldn't be included in the nuspec file.

JoelHT-Landmark commented 8 years ago

Fix is easy in the TT file:

 var packages = packagesDoc.Descendants("package")
    .Where(p => (p.Attribute("developmentDependency") == null) &&
                (!p.Attribute("id").Value.ToLowerInvariant().StartsWith("nuget.")));