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

Packaged project incorrectly includes dependencies on NuGet.PackageNPublish and NuGet.Build #11

Closed JoelHT-Landmark closed 11 years ago

JoelHT-Landmark commented 11 years ago

When the output NuGet package is build the dependencies baked into the metadata are derived by the package.tt from the packages.config file for the packaging project.

However, the packaging project itself has dependencies on NuGet.PackageNPublish and NuGet.Build that should NOT be transferred into the dependencies for the output package.

dittodhole commented 11 years ago

One dirty way (if you are 100% sure that you do not need this dependency):

Track "*.NuGetPackage.tt" and look for

var packages = from p in packagesDoc.Descendants("package") select p;

Change that to:

var packages = from p in packagesDoc.Descendants("package") where p.Attribute("id").Value != "NuGet.PackageNPublish" select p;
JoelHT-Landmark commented 11 years ago

This is exactly the fix I'm implementing for v0.7 - any dependent packages starting in "NuGet." will be excluded by default. You can always manually add a dependency back in to the TT file if you really do depend on a NuGet.* package.

JoelHT-Landmark commented 11 years ago

Fixed in release v0.7.0.0