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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -