c# - How do you include Xml Docs for a class library in a NuGet package? -
i creating nuget package c# class library, , include generated xml documentation library. nuspec file:
<?xml version="1.0" encoding="utf-8"?> <package> <metadata> <id>mylibrary</id> <version>1.0.0.0</version> <authors>john nelson</authors> <language>en-us</language> <description>a c# class library</description> </metadata> <files> <file src="..\..\build\mylibrary.dll" target="lib\net40" /> <file src="..\..\build\mylibrary.xml" target="lib\net40" /> </files> </package>
when build package command:
nuget pack mylibrary.nuspec
it generates error. if remove line:
<file src="..\..\build\mylibrary.xml" target="lib\net40" />
nuget.exe creates nupkg. can unzip package, , verify contents correct. doing wrong? should xml file go different target directory?
the problem didn't check "generate xml documentation" build configuration using. nuspec correct.
Comments
Post a Comment