src/T4Toolbox.VisualStudio/OutputFileManager.cs
/// <summary>
/// Sets the metadata for the <see cref="ProjectItem" /> added to solution.
/// </summary>
Sets the metadata for the  added to solution.
Sets the metadata for the added to solution .
private static void ConfigureProjectItemMetadata(ProjectItem projectItem, OutputFile output)
        {
            foreach (KeyValuePair<string, string> metadata in output.Metadata)
            {
                switch (metadata.Key)
                {
                    case ItemMetadata.CopyToOutputDirectory:
                        projectItem.SetPropertyValue(ProjectItemProperty.CopyToOutputDirectory, output.CopyToOutputDirectory);
                        continue;
                    case ItemMetadata.CustomToolNamespace:
                        projectItem.SetPropertyValue(ProjectItemProperty.CustomToolNamespace, metadata.Value);
                        continue;
                    case ItemMetadata.Generator:
                        projectItem.SetPropertyValue(ProjectItemProperty.CustomTool, metadata.Value);
                        continue;
                }
                projectItem.SetItemAttribute(metadata.Key, metadata.Value);
            }
        }
private static void ConfigureProjectItemMetadata ( ProjectItem projectItem , OutputFile output ) { foreach ( KeyValuePair < string , string > metadata in output . Metadata ) { switch ( metadata . Key ) { case ItemMetadata . CopyToOutputDirectory : projectItem . SetPropertyValue ( ProjectItemProperty . CopyToOutputDirectory , output . CopyToOutputDirectory ) ; continue ; case ItemMetadata . CustomToolNamespace : projectItem . SetPropertyValue ( ProjectItemProperty . CustomToolNamespace , metadata . Value ) ; continue ; case ItemMetadata . Generator : projectItem . SetPropertyValue ( ProjectItemProperty . CustomTool , metadata . Value ) ; continue ; } projectItem . SetItemAttribute ( metadata . Key , metadata . Value ) ; } }
Sets the metadata for the  added to solution.
Sets the metadata for the added to solution .
// Set build projerties for the target project item // Set well-known metadata items via ProjectItem.Properties for immediate effect in Visual Studio // Set all other metadata items
projectItem
ProjectItem
output
OutputFile