Creates a new warning to store information about errors that occur during the text template transformation process.
Assembly: Microsoft.VisualStudio.TextTemplating (in Microsoft.VisualStudio.TextTemplating.dll)
Adds the warning to the collection of Errors for the text template transformation process. Sets the line number of the error to -1, and the column number of the error to -1 by default.
The following code example demonstrates calling the Warning method from a text template. Paste this code into any text template file and run the text template transformation to see the results. The warning will appear in the Error List.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.