Embedding Content and Resources in Assemblies

The previous section discussed embedded and linked files. When you create an assembly, the manifest informs the Common Language Runtime of all dependent files. If you want to make sure that a specific icon, image, text file, or whatever file you need, is considered a necessary part of your application, you can make it a part of your assembly.

There are two ways to make a file part of your assembly. You can either embed the file directly into the assembly, or you can make the assembly refer to the file via the manifest. When using Visual Studio .NET, it is actually quite easy to create embedded resources, so that's what will be covered in this next section.

Keep in mind that you can store absolutely ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.