Skip to content

Commit d3067c2

Browse files
author
Peter Nied
committed
Merge pull request #5 from garethj-msft/master
Added a simple templates project to make editing easier.
2 parents 0ac3812 + c7eba3c commit d3067c2

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

GraphODataTemplateWriter.sln

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.31101.0
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25123.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6ACF6CEE-A594-4DFE-9286-C7154E91738B}"
77
ProjectSection(SolutionItems) = preProject
@@ -12,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6ACF6C
1212
EndProject
1313
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphODataTemplateWriter", "src\GraphODataTemplateWriter\GraphODataTemplateWriter.csproj", "{E6B5202F-4F66-428A-AB92-0AAA11BA81DE}"
1414
EndProject
15+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Templates", "Templates\Templates.csproj", "{5F526973-F69E-4C26-B8AD-612590A17A9E}"
16+
EndProject
1517
Global
1618
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1719
Debug|Any CPU = Debug|Any CPU
@@ -22,6 +24,8 @@ Global
2224
{E6B5202F-4F66-428A-AB92-0AAA11BA81DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
2325
{E6B5202F-4F66-428A-AB92-0AAA11BA81DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
2426
{E6B5202F-4F66-428A-AB92-0AAA11BA81DE}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{5F526973-F69E-4C26-B8AD-612590A17A9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{5F526973-F69E-4C26-B8AD-612590A17A9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
2529
EndGlobalSection
2630
GlobalSection(SolutionProperties) = preSolution
2731
HideSolutionNode = FALSE

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ The type of template.
109109
To set the name of the template using the `Name` format string. You can insert `<Class>`, `<Property>`, `<Method>`, and `<Container>` the values will be replaced by the names of the corresponding object. If you insert an item that doesn't exist it will be replaced with an empty string.
110110
Note: You can also set the template name from inside the template by : `host.SetTemplateName("foo");`
111111

112+
#### Template Editing
113+
114+
The solution contains a non-building project to host the actual T4 templates and make browsing/editing them easier. New template files will be automatically discovered by this project.
115+
112116
#### Includes/Excludes
113117

114118
There may be specific times when you want to exclude or only process certain objects from the SubProcessor. To Do this you can either set a semicolon delimited list of objects you wanted to include : `Include : foo;bar`. This will only process objects whose names are foo or bar. The opposite of this is the exclude setting where the SubProcessor will include all objects except for those whose names are in the exclude list, exclude and include can not be used together.

Templates/Templates.csproj

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectGuid>{5F526973-F69E-4C26-B8AD-612590A17A9E}</ProjectGuid>
7+
<OutputType>Library</OutputType>
8+
<NoStandardLibraries>false</NoStandardLibraries>
9+
<AssemblyName>ClassLibrary</AssemblyName>
10+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
11+
<FileAlignment>512</FileAlignment>
12+
</PropertyGroup>
13+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14+
<DebugSymbols>true</DebugSymbols>
15+
<DebugType>full</DebugType>
16+
<Optimize>false</Optimize>
17+
<OutputPath>bin\Debug\</OutputPath>
18+
<DefineConstants>DEBUG;TRACE</DefineConstants>
19+
<ErrorReport>prompt</ErrorReport>
20+
<WarningLevel>4</WarningLevel>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23+
<DebugType>pdbonly</DebugType>
24+
<Optimize>true</Optimize>
25+
<OutputPath>bin\Release\</OutputPath>
26+
<DefineConstants>TRACE</DefineConstants>
27+
<ErrorReport>prompt</ErrorReport>
28+
<WarningLevel>4</WarningLevel>
29+
</PropertyGroup>
30+
<PropertyGroup>
31+
<RootNamespace>Templates</RootNamespace>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="Microsoft.CSharp" />
35+
<Reference Include="System" />
36+
<Reference Include="System.Core" />
37+
</ItemGroup>
38+
<ItemGroup>
39+
<Content Include="*\*.tt" />
40+
<Content Include="*\*\*.tt" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
44+
</ItemGroup>
45+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" />
46+
<ProjectExtensions>
47+
<VisualStudio AllowExistingFolder="true" />
48+
</ProjectExtensions>
49+
</Project>

0 commit comments

Comments
 (0)