SYSK 115: Do You Know When and How to Use TypeForwardedTo Attribute?

Do you remember the old TreatAs registry setting for COM classes?  If you want a quick refresher, check out


Well, TypeForwardedTo attribute is kind of like that… You use the TypeForwardedToAttribute attribute to move a type from one assembly to another without disrupting callers that compiled against the old assembly.  This allows you to reorganize your libraries without breaking compatibility with applications using them.


Bill Bozeman has a good explanation of it with a code sample at,guid,2e6d7675-eb43-438f-8b93-9155ca1712fa.aspx.


To summarize the steps, here is what you need to do:

  1. Create a new assembly

  2. Move the class from the old assembly to the new.  Make sure to keep same namespace.

  3. Remove the class from the old assembly.

  4. In the old assembly, add a reference to the new assembly.

  5. Add [assembly: TypeForwardedTo(typeof(YourClassName))] to the old assembly

  6. Recompile and redeploy both assemblies




Comments (0)

Skip to main content