Resource only dll?

  • Thread starter Thread starter Derrick
  • Start date Start date
D

Derrick

I'd like to create a package of XML/XSD files in a resource only dll, anyone
have a link for an example showing how to do this in .NET and then load and
reference it in C#?

Thanks in advance!

Derrick
 
Create a "Class Library" project. Remove everything except the
AssemblyInfo.cs file from the project.
Add your XML and XSD files to the project and set their Build Action to
Embedded Resource
Then compile the project and you should have the resource library.

To retrieve the stored resources, you will need to load the assembly with
Assembly.Load or Assembly.LoadFrom and use the Assembly class'
GetManifestResourceStream method.
 
Back
Top