ProvideCodeGeneratorExtensionAttribute Class
Attribute class to provide registration of a code generator against a specific file extension
Assembly: Microsoft.VisualStudio.TextTemplating.VSHost.12.0 (in Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll)
System::Attribute
Microsoft.VisualStudio.Shell::RegistrationAttribute
Microsoft.VisualStudio.TextTemplating.VSHost::ProvideCodeGeneratorExtensionAttribute
| Name | Description | |
|---|---|---|
![]() | Extension | The extension to bind the named generator to |
![]() | Name | The name of the generator to add an extension for |
![]() | ProjectSystem | The project system that this code generator is registered with |
![]() | ProjectSystemPackage | The package implementing the project system that this code generator is registered with |
![]() | TypeId | (Inherited from RegistrationAttribute.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Attribute.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object^) | (Inherited from Attribute.) |
![]() | Register(RegistrationAttribute::RegistrationContext^) | |
![]() | ToString() | (Inherited from Object.) |
![]() | Unregister(RegistrationAttribute::RegistrationContext^) |
| Name | Description | |
|---|---|---|
![]() ![]() | AspNetProjectSystemGuid | Actual project GUID (as opposed to package Guid) for ASP.Net |
![]() ![]() | CSharpProjectSystemGuid | Actual project GUID (as opposed to package Guid) for CSharp |
![]() ![]() | VisualBasicProjectSystemGuid | Actual project GUID (as opposed to package Guid) for Visual Basic |
| Name | Description | |
|---|---|---|
![]() ![]() | _Attribute::GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
Should be applied to the package class, not the generator, in addition to the ProvideCodeGenerator attribute. This attribute sets up two things:
Default application of the specified generator to files with the extension provided
Correct working with the ASP.Net project system which requires file extensions to be registered
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





