This project has moved and is read-only. For the latest updates, please go here.

Script scrapes and adds icons & images to package contents

Sep 17, 2015 at 4:27 PM
I am creating a package for multiple assemblies, and the script seems to scrape the project for .ico, .png and other image files and put them into the package contents, such that they are all added to the target project. How do I keep this from happening?
Sep 17, 2015 at 4:36 PM
The script doesn't actually do any scraping like that; it would be the NuGet.exe that the script calls to create the .nupkg file doing the scraping. The script is essentially just a pass-thru to the NuGet.exe for the most part. You would need to find the app appropriate NuGet.exe command line parameter to pass in ( and provide it to the script using the PackOptions parameter. Hopefully that gets you going :)
Sep 17, 2015 at 5:13 PM
As a test, I have tried adding to the packProperties:

$packProperties = "TargetFrameworkVersion=v4.6;Optimize=true;Exclude=*.ico"

I have also tried adding this to the packOptions:

$packOptions = "-Symbols -IncludeReferencedProjects -Exclude *.ico"

Neither of these work, and all the .ico resources of the referenced assemblies are put into the target project. The documentation via is terrible and provides no practical examples.

Does anyone know how to do this?
Sep 17, 2015 at 5:28 PM
I would suggest posting the question on NuGet's site asking them how to do it using the NuGet.exe console app.