I am hoping to add the auto-generated XML documentation file produced by Visual Studio to my project's Assembly as an Embedded Resource, but I am uncertain how to go about this. I am aware that I can manually alter the .csproj
file to add resources, using something like:
<EmbeddedResource Include="Path\To\File\MyEmbeddedResource.meta.xml">
<Link>MyEmbeddedResource.meta.xml</Link>
</EmbeddedResource>
But I don't know how that interacts with the Build procedure, or what path I would provide for the XML file, given that it itself is placed in the build folder?
I know I can use the above snippet to add an arbitrary file as an embedded resource for the .dll
, but how do I ensure that the documentation file is up to date, and uses the one generated in the most recent build?
The overall goal here is to have the documentation accessible via reflection, such that the .dll
has fewer external file dependencies. Given that the project itself is a Class Library, I would hope that any answer doesn't break when the Assembly is included in another project.