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. _assembly = Assembly.GetExecutingAssembly();
_imageStream = _assembly.GetManifestResourceStream("WindowsFormsApplication8.MyImage.bmp"); _textStreamReader = new StreamReader(_assembly.GetManifestResourceStream("WindowsFormsApplication8.MyTextFile.txt")); |
|