Need a way to Disable Warnings

Sep 22, 2011 at 6:57 PM

I'm building a project that puts a dll with PowerShell cmdlets into the tools folder.  When I create the package I get a warning from NuGet

EXEC : warning : 1 issue(s) found with package 'Microsoft.Activities'.

Issue: Assembly outside lib folder.
Description: The assembly 'tools\Microsoft.Activities.NuGet.dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
Solution: Move it into 'lib' folder.

I see the reason for the warning but in my case it is perfectly fine to do this so I want to disable the warning. I don't see any command line switch to control warnings with Nuget.exe

Sep 22, 2011 at 7:19 PM

You can disable the warnings with the -NoPackageAnalysis flag.

Sep 22, 2011 at 7:38 PM

Thanks - I checked the command line reference and didn't see this option at

Dec 31, 2013 at 8:28 PM
Would it be possible to add support for more fine-grained warning suppression?

Something akin to Visual Studio Code Analysis would be nice. Disabling all warnings just because I have a single known exception strikes me as poor practice, as it would also suppress all other warnings that I might benefit from, if I got them.
Jul 1, 2014 at 5:34 PM
I would also like to see the ability to ignore specific warnings. Currently, NuGet is complaining to me about not adding stuff because they already exist. This is intentional because I don't want NuGet to automatically add project output (exe and pdb) to my package, I want to explicitly add them. However, NuGet pack doesn't provide enough control for me to tell it not to do this, which leaves me with the warning. So I am now in a situation where I have a warning that I cannot make go away and still achieve my desired results and I cannot hide the warning. Ultimately, I have to turn package analysis off, which strikes me as a very bad idea but it is better than becoming complacent to warnings from other tools in my build-chain.