Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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 */
IList<String> get_StandardAssemblyReferences ()

function get StandardAssemblyReferences () : IList<String>

Property Value

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 will use these references when compiling and executing 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 provided for the ITextTemplatingEngineHost interface.

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
        };
    }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.