Creating and Using Multifile Assemblies
page 7 of 7
by J. Ambrose Little
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 33626/ 51

And Now for the Gotchas

As already mentioned, VS.NET 2002 and 2003 cannot handle multifile assemblies.  In fact, with the notable exception of Visual C++ with Managed Extensions, you cannot even specify a project to compile as a module.  Because of this, you will have to maintain build scripts like the ones in the demo (only more complex) and ensure that the files, references, and other project settings are the same in the build scripts as they are in the VS.NET project file.

Also, as of v7.1 (2003), Visual C# does not support Intellisense for code that is in modules, that is, not in the main assembly file with the assembly manifest.  Thus, if you use option one above and reference that assembly in a C# project in VS.NET, absolutely none of the types in that assembly will show up in Intellisense.  If you use option two above, only those types in the main assembly project (in our case, CSLibrary) will be visible in Intellisense.  As I see it, this is a very grave reason not to use multifile assemblies for code libraries unless you can architect it in such a way that all public types will be in the main assembly.  Note that this limitation does not apply to VB.NET--all types are visible in Intellisense regardless of which method you use.

I presume that you can understand now why I recommend against using multifile assemblies unless you really need them.  Both of these limitations can make creating and using them more of a problem than a solution for most.  The biggest niche for them will be internet deployment, but that is not too common today.  Hopefully the Visual Studio.NET teams will enhance their products to better support them in the future, but in the meantime, beware.


View Entire Article

User Comments

Title: very good article and explanantion   
Name: Jon
Date: 2005-08-12 12:18:56 AM
Comment:
I don't use Visual Studio for .net development, so this is excellent information for my work.

Thanks
Title: fd   
Name: sp
Date: 2005-07-06 7:08:13 AM
Comment:
good
Title: Good quick explanation of the al   
Name: Tom
Date: 2004-09-28 1:06:37 PM
Comment:
I was looking for a quick explanation of the assembly linker and I found this through a search on the web. It was concise and well written. Thanks.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 5:52:15 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search