Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
Reference
Properties
 CustomTool Property (Visual Basic a...
Visual Basic and Visual C# Project Extensibility
CustomTool Property (Visual Basic and C# ProjectItem Object)

Returns or sets the program identifier of the custom tool associated with the file. A custom tool takes as input the file represent by one ProjectItem and writes a new file.

[Visual Basic .NET]
Public Property CustomTool() As String
[Visual Basic 6]
Property Get CustomTool() As String
Property Let CustomTool( _
   ByVal NewValue As String _
) 
[C++]
HRESULT __stdcall get_ CustomTool(
   /* [out, retval] */ BSTR* retVal
);
HRESULT __stdcall put_ CustomTool(
   /* [in] */ BSTR NewValue
);
[C#]
string CustomTool {get; set;}
[JScript .NET]
public function get CustomTool() : String
public function set CustomTool(
   NewValue : String
)

Parameters

NewValue
The program identifier of the custom tool to be associated with the project item.

Return Value

String.

Remarks

Custom tools convert files from one type to another at design time. The formats of the input file and the output file are entirely dependent on the custom tool. For example, a custom tool may take input of the form:

string1=value1
string2=value2

and convert it to XML as follows:

<string name="string1" val="value1"/>
<string name="string2" val="value2"/>

A custom tool is a registered component that implements the IvsSingleFileGenerator interface. These tools are registered as HKLM\Software\Microsoft\VisualStudio\7.0\Generators\packageguid.

The program identifier is a succinct, readable string that describes what the custom tool does. This string is assigned by the custom tool creator.

If the CustomTool property is set to an invalid identifier, then the project system will add an entry to the Task List reporting that the custom tool could not be instantiated.

See Also

BuildManager Object | Properties Property (General Extensibility) | ProjectItem Object | RunCustomTool Method

Applies To: Properties Property (Visual Basic and C# ProjectItem Object)

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker