IFileExtensionRegistryService::AddFileExtension Method (String^, IContentType^)
Adds a new file extension to the registry.
Assembly: Microsoft.VisualStudio.CoreUtility (in Microsoft.VisualStudio.CoreUtility.dll)
Parameters
- extension
-
Type:
System::String^
The file extension. The period is optional.
- contentType
-
Type:
Microsoft.VisualStudio.Utilities::IContentType^
The content type for the file extension.
| Exception | Condition |
|---|---|
| InvalidOperationException | extension is already present in the registry. |
This method throws InvalidOperationException if the specified file extension is already present in the registry.
Show: