# Multifile assemblies

You can create multifile assemblies that target the .NET Framework using command-line compilers or Visual Studio with Visual C++. One file in the assembly must contain the assembly manifest. An assembly that starts an application must also contain an entry point, such as a Main or WinMain method.

For example, suppose you have an application that contains two code modules, Client.cs and Stringer.cs. Stringer.cs creates the myStringer namespace that is referenced by the code in Client.cs. Client.cs contains the Main method, which is the application's entry point. In this example, you compile the two code modules, and then create a third file that contains the assembly manifest, which launches the application. The assembly manifest references both the Client and Stringer modules.

Note

Multifile assemblies can have only one entry point, even if the assembly has multiple code modules.

There are several reasons you might want to create a multifile assembly:

• To combine modules written in different languages. This is the most common reason for creating a multifile assembly.

If you are creating applications that will be downloaded using the <object> tag with Microsoft Internet Explorer, it is important that you create multifile assemblies. In this scenario, you create a file separate from your code modules that contains only the assembly manifest. Internet Explorer downloads the assembly manifest first, and then creates worker threads to download any additional modules or assemblies required. While the file containing the assembly manifest is being downloaded, Internet Explorer will be unresponsive to user input. The smaller the file containing the assembly manifest, the less time Internet Explorer will be unresponsive.