Pack includes CodeAnalysisLog

Sep 12, 2011 at 5:14 PM

Turning on static code analysis in a build configuration produces a file called <AssemblyName>.dll.CodeAnalysisLog.xml in the output directory. This file is being included in the package built by the Pack command. Further experimentation seems to indicate that any file that starts with <AssemblyName> and ends with .xml is included, although other extensions starting with <AssemblyName> and xml files not starting with <AssemblyName> are not included. My guess is that the purpose of this is to pick up the <AssemblyName>.xml documentation file; however, it needs to be targeted more narrowly.

Sep 12, 2011 at 5:32 PM

There are multiple ways of running 'nuget pack'. Can you give more details about what you're doing?

Sep 12, 2011 at 5:39 PM

I am running the following from a Visual Studio command line at my project directory (the nuspec file was created using "nuget spec" and has had no significant modification):

nuget pack MyProj.csproj -Build -Prop Configuration=Release -OutputDirectory "MyLocalPackages"

I have started adding the following flag to exclude the CodeAnalysisLog from the package:

-Exclude "**\*.CodeAnalysisLog.xml"

Sep 12, 2011 at 5:43 PM

That may be a bug, I don't think it should include that file.