Export (0) Print
Expand All

ITextTemplatingEngineHost.StandardAssemblyReferences Property

Gets a list of assembly references.

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating (in Microsoft.VisualStudio.TextTemplating.dll)

IList<string> StandardAssemblyReferences { get; }

Property Value

Type: System.Collections.Generic.IList<String>
An IList that contains assembly names.

Allows a host to specify standard assemblies to be referenced by the generated transformation class (for example, System.dll). The engine uses these references when it compiles and executes the generated transformation class.

The following code example shows a possible implementation for a custom host. This code example is part of a larger example. For the complete example, see Walkthrough: Creating a Custom Text Template Host.

public IList<string> StandardAssemblyReferences
{
    get
    {
        return new string[]
        {
            //if this host searches standard paths and the GAC
            //we can specify the assembly name like this
            //---------------------------------------------------------
            //"System"

            //because this host only resolves assemblies from the 
            //fully qualified path and name of the assembly
            //this is a quick way to get the code to give us the
            //fully qualified path and name of the System assembly
            //---------------------------------------------------------
            typeof(System.Uri).Assembly.Location
        };
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft