Directory
Ways to extend My namespace
Use a single example to extend my
Various my extension scenarios
Encoding extension
Package extensions into a template
My extension as a template
. customdata file
Try!
To publish an extension in the Visual Studio Installer file
Early in Visual basic®2005, the introduction of the My Namespace feature provides a quick way and API for common coding tasks. Since then, users have been able to write my namespace extensions to easily access their own code libraries. The new my extensibility provided in Visual Basic 2008 makes it easier to extend my namespace.
With the new My extensibility feature, you can activate or deactivate my namespace extension through the project Properties designer or when you add/remove related references to a project. By deploying APIs for common coding tasks, this feature makes it easy to extend the Visual Basic development environment.
In this section, I will focus on how to use my extensibility feature to integrate extensions. If you want to learn more about how to write the actual code extensions for my namespace, read the July 2005 issue of MSDN® Magazine, "Simplifying common tasks by customizing My Namespace" (http://msdn.microsoft.com/msdnmag/ issues/05/07/my).
Ways to extend My namespace
You can use multiple code models to extend my. Let's begin by introducing the simplest model that you already know how to use. In fact, adding anything to my namespace is very similar to adding content to any other namespace. The simplest example is the following:
Namespace My.HandyStuffForMy
<Global.Microsoft.VisualBasic.HideModuleName()> _
Friend Module HandyStuffForMyModule
Sub Foo()
...
End Sub
Property Bar()
...
End Property
End Module
End Namespace