How do I include an XSD file for a configuration section with a NuGet package? -
i have library pretty verbose configuration section. i've created xsd , distribute package when user installs package, visual studio knows xsd without user needing extra. how do this?
you can include files want in nuget package placing them in content directory. these installed root of target project when package installed. if you're using nuspec file build package add following element under element.
<files> <file src="configuration\myxsd.xsd" target="content\targetfoldername" /> </files>
this create following file in target project
\targetfoldername\myxsd.xsd
once xsd in target project visual studio should pick automatically validating config section.
Comments
Post a Comment