2 <Project xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003" DefaultTarget=
"Build">
4 <PresentationStyle Condition=
"'$(PresentationStyle)' == ''">vs2005
</PresentationStyle>
6 <ProjectRoot Condition=
"'$(ProjectRoot)' == ''">$(MSBuildProjectDirectory)\..\..
</ProjectRoot>
7 <Framework>$(WINDIR)\Microsoft.NET\Framework\v2.0
.50727</Framework>
8 <DxRoot>$(ProjectRoot)\tools\Sandcastle
</DxRoot>
9 <ProductionTools>$(DxRoot)\ProductionTools
</ProductionTools>
10 <ProductionTransforms>$(DxRoot)\ProductionTransforms
</ProductionTransforms>
11 <Presentation>$(DxRoot)\Presentation\$(PresentationStyle)
</Presentation>
12 <HHC>$(PROGRAMFILES)\Html Help Workshop\hhc.exe
</HHC>
14 <OutputAssemblyFile>$(OutputPath)\$(OutputAssembly).dll
</OutputAssemblyFile>
16 <DocOutputApiPath>$(DocOutputPath)\api
</DocOutputApiPath>
17 <DocIntermediatePath>$(ProjectRoot)\obj\Doc\$(Configuration)
</DocIntermediatePath>
18 <FxReflectionIntermediatePath>$(ProjectRoot)\obj\Doc\Tmp
</FxReflectionIntermediatePath>
19 <FxReflectionOutputPath>$(ProjectRoot)\obj\Doc\Reflection
</FxReflectionOutputPath>
20 <ChmDir>$(DocIntermediatePath)\chm
</ChmDir>
22 <TocFile>$(ChmDir)\toc.xml
</TocFile>
23 <ChmFile>$(DocOutputPath)\$(OutputAssembly).chm
</ChmFile>
24 <HxtFile>$(DocOutputPath)\$(OutputAssembly).HxT
</HxtFile>
25 <HxsFile>$(DocOutputPath)\$(OutputAssembly).hxs
</HxsFile>
26 <HxcFile>$(DocOutputPath)\$(OutputAssembly).hxc
</HxcFile>
27 <HhkFile>$(chmDir)\$(OutputAssembly).hhk
</HhkFile>
28 <HhpFile>$(chmDir)\$(OutputAssembly).hhp
</HhpFile>
29 <ReflectionFile>$(DocIntermediatePath)\reflection.xml
</ReflectionFile>
30 <ManifestFile>$(DocIntermediatePath)\manifest.xml
</ManifestFile>
31 <ReflectionBaseFile>$(DocIntermediatePath)\reflection_base.xml
</ReflectionBaseFile>
35 <AssemblyFolders Include=
"$(WINDIR)\Microsoft.NET\Framework\v2.0.50727\*.dll"/>
36 <AssemblyFolders Include=
"$(WINDIR)\Microsoft.NET\Framework\v3.0\**\*.dll" Condition=
"$(NetfxVer)>2.0"/>
37 <AssemblyFolders Include=
"$(ProgramFiles)\Reference Assemblies\Microsoft\Framework\v3.0\*.dll" Condition=
"$(NetfxVer)>2.0"/>
38 <AssemblyFolders Include=
"$(WINDIR)\Microsoft.NET\Framework\v3.5\**\*.dll" Condition=
"$(NetfxVer)>3.0"/>
39 <AssemblyFolders Include=
"$(ProgramFiles)\Reference Assemblies\Microsoft\Framework\v3.5\*.dll" Condition=
"$(NetfxVer)>3.0"/>
42 <Target Name=
"CleanDocumentation">
43 <Delete Files=
"$(ReflectionFile);$(ManifestFile);$(ReflectionBaseFile);$(ChmFile)" TreatErrorsAsWarnings=
"true"/>
44 <RemoveDir Directories=
"$(DocOutputApiPath);$(DocIntermediatePath);$(ChmDir)" ContinueOnError=
"true"/>
45 <RemoveDir Directories=
"$(FxReflectionIntermediatePath)" ContinueOnError=
"true" />
46 <!--<RemoveDir Directories="$(FxReflectionOutputPath)" ContinueOnError="true" />-->
49 <Target Name=
"CreateIntermediatePath">
50 <MakeDir Directories=
"$(DocIntermediatePath)" Condition=
"!Exists('$(DocIntermediatePath)')" />
53 <Target Name=
"SetEnvironmentVars">
54 <SetEnvironmentVariable Name=
"DxRoot" Value=
"$(DxRoot)" />
55 <SetEnvironmentVariable Name=
"DocumentationFile" Value=
"$(DocumentationFile)" />
56 <SetEnvironmentVariable Name=
"ReflectionXmlFile" Value=
"$(ReflectionFile)" />
57 <SetEnvironmentVariable Name=
"OutputHtml" Value=
"$(DocOutputApiPath)\html" />
58 <SetEnvironmentVariable Name=
"FxReflectionData" Value=
"$(FxReflectionOutputPath)" />
61 <Target Name=
"FxReflection" Condition=
"!Exists('$(FxReflectionOutputPath)')">
62 <MakeDir Directories=
"$(FxReflectionIntermediatePath)" Condition=
"!Exists('$(FxReflectionIntermediatePath)')" />
63 <MakeDir Directories=
"$(FxReflectionOutputPath)" Condition=
"!Exists('$(FxReflectionOutputPath)')" />
64 <CreateItem Include=
"@(AssemblyFolders->'%(FullPath)')">
65 <Output ItemName=
"Assemblies" TaskParameter=
"Include"/>
67 <!--<Message Text="%(Assemblies.FullPath)" />-->
68 <Exec ContinueOnError=
"true" IgnoreExitCode=
"true"
69 Command='
"$(ProductionTools)\Mrefbuilder.exe" "%(Assemblies.FullPath)" /out:
"$(FxReflectionIntermediatePath)\%(Assemblies.FileName).xml"'
/>
70 <Exec Condition=
"'$(PresentationStyle)' == 'prototype'" ContinueOnError=
"true" IgnoreExitCode=
"true"
71 Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ApplyPrototypeDocModel.xsl" /xsl:
"$(ProductionTransforms)\AddGuidFilenames.xsl" "$(FxReflectionIntermediatePath)\%(Assemblies.FileName).xml" /out:
"$(FxReflectionOutputPath)\%(Assemblies.FileName).xml" /arg:IncludeAllMembersTopic=false /arg:IncludeInheritedOverloadTopics=true'
/>
72 <Exec Condition=
"'$(PresentationStyle)' == 'vs2005'" ContinueOnError=
"true" IgnoreExitCode=
"true"
73 Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ApplyVSDocModel.xsl" /xsl:
"$(ProductionTransforms)\AddFriendlyFilenames.xsl" "$(FxReflectionIntermediatePath)\%(Assemblies.FileName).xml" /out:
"$(FxReflectionOutputPath)\%(Assemblies.FileName).xml" /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=true'
/>
74 <Exec Condition=
"'$(PresentationStyle)' == 'hana'" ContinueOnError=
"true" IgnoreExitCode=
"true"
75 Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ApplyVSDocModel.xsl" /xsl:
"$(ProductionTransforms)\AddFriendlyFilenames.xsl" "$(FxReflectionIntermediatePath)\%(Assemblies.FileName).xml" /out:
"$(FxReflectionOutputPath)\%(Assemblies.FileName).xml" /arg:IncludeAllMembersTopic=false /arg:IncludeInheritedOverloadTopics=true'
/>
79 <IconFiles Include=
"$(Presentation)\icons\**\*.*"/>
80 <ScriptFiles Include=
"$(Presentation)\scripts\**\*.*"/>
81 <StyleFiles Include=
"$(Presentation)\styles\**\*.*"/>
82 <IconDestFiles Include=
"@(IconFiles->'$(DocOutputApiPath)\icons\%(RecursiveDir)%(FileName)%(Extension)')"/>
83 <ScriptDestFiles Include=
"@(ScriptFiles->'$(DocOutputApiPath)\scripts\%(RecursiveDir)%(FileName)%(Extension)')"/>
84 <StyleDestFiles Include=
"@(StyleFiles->'$(DocOutputApiPath)\styles\%(RecursiveDir)%(FileName)%(Extension)')"/>
87 <Target Name=
"Template">
88 <Copy SourceFiles=
"@(IconFiles)" DestinationFiles=
"@(IconDestFiles)" SkipUnchangedFiles=
"true"/>
89 <Copy SourceFiles=
"@(ScriptFiles)" DestinationFiles=
"@(ScriptDestFiles)" SkipUnchangedFiles=
"true"/>
90 <Copy SourceFiles=
"@(StyleFiles)" DestinationFiles=
"@(StyleDestFiles)" SkipUnchangedFiles=
"true"/>
91 <MakeDir Directories=
"$(DocOutputApiPath)\html;$(DocOutputApiPath)\media;$(DocOutputApiPath)\intellisense"/>
94 <Target Name=
"ReflectionBase" Inputs=
"$(OutputAssemblyFile)" Outputs=
"$(ReflectionBaseFile)"
95 DependsOnTargets=
"SetEnvironmentVars;CreateIntermediatePath">
96 <Exec Command='
"$(ProductionTools)\MRefBuilder.exe" "$(OutputAssemblyFile)" /out:
"$(ReflectionBaseFile)"'
/>
99 <Target Name=
"ReflectionData" DependsOnTargets=
"FxReflection;ReflectionBase" Inputs=
"$(ReflectionBaseFile)" Outputs=
"$(ReflectionFile)">
100 <Exec Condition=
"'$(PresentationStyle)' == 'prototype'" Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ApplyPrototypeDocModel.xsl" /xsl:
"$(ProductionTransforms)\AddGuidFilenames.xsl" "$(ReflectionBaseFile)" /out:
"$(ReflectionFile)"'
/>
101 <Exec Condition=
"'$(PresentationStyle)' == 'vs2005'" Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ApplyVSDocModel.xsl" /xsl:
"$(ProductionTransforms)\AddFriendlyFilenames.xsl" "$(ReflectionBaseFile)" /out:
"$(ReflectionFile)" /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=true'
/>
102 <Exec Condition=
"'$(PresentationStyle)' == 'hana'" Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ApplyVSDocModel.xsl" /xsl:
"$(ProductionTransforms)\AddFriendlyFilenames.xsl" "$(ReflectionBaseFile)" /out:
"$(ReflectionFile)" /arg:IncludeAllMembersTopic=false /arg:IncludeInheritedOverloadTopics=true'
/>
105 <Target Name=
"Manifest" DependsOnTargets=
"ReflectionData" Inputs=
"$(ReflectionFile)" Outputs=
"$(ManifestFile)">
106 <Exec Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ReflectionToManifest.xsl" "$(ReflectionFile)" /out:
"$(ManifestFile)"'
/>
110 Inputs=
"$(ManifestFile);$(ReflectionFile);$(DocumentationFile)"
111 Outputs=
"$(DocOutputApiPath)\html\N_ProductName.htm"
112 DependsOnTargets=
"SetEnvironmentVars;Template;Manifest">
113 <Exec Command='
"$(ProductionTools)\BuildAssembler.exe" /config:
"$(Presentation)\configuration\sandcastle.config" "$(ManifestFile)"'
/>
116 <Target Name=
"Chm" Inputs=
"$(DocOutputApiPath)\html\N_ProductName.htm;$(ReflectionFile)" Outputs=
"$(ChmFile)" DependsOnTargets=
"Html">
117 <MakeDir Directories=
"$(chmDir)" Condition=
"!Exists('$(chmDir)')" />
118 <MakeDir Directories=
"$(chmDir)\Html" Condition=
"!Exists('$(chmDir)\Html')" />
119 <MakeDir Directories=
"$(chmDir)\Icons" Condition=
"!Exists('$(chmDir)\Icons')" />
120 <MakeDir Directories=
"$(chmDir)\Scripts" Condition=
"!Exists('$(chmDir)\Scripts')" />
121 <MakeDir Directories=
"$(chmDir)\Styles" Condition=
"!Exists('$(chmDir)\Styles')" />
122 <MakeDir Directories=
"$(chmDir)\Local" Condition=
"!Exists('$(chmDir)\Local')" />
124 <Exec Condition=
"'$(PresentationStyle)' == 'prototype'" Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\CreatePrototypeToc.xsl" "$(ReflectionFile)" /out:
"$(TocFile)"'
/>
125 <Exec Condition=
"'$(PresentationStyle)' != 'prototype'" Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\CreateVSToc.xsl" "$(ReflectionFile)" /out:
"$(TocFile)"'
/>
127 <!--copy directories from hxs -->
128 <Copy SourceFiles=
"@(IconFiles)" DestinationFolder=
"$(chmDir)\icons\%(RecursiveDir)" SkipUnchangedFiles=
"true"/>
129 <Copy SourceFiles=
"@(ScriptFiles)" DestinationFolder=
"$(chmDir)\scripts\%(RecursiveDir)" SkipUnchangedFiles=
"true"/>
130 <Copy SourceFiles=
"@(StyleFiles)" DestinationFolder=
"$(chmDir)\styles\%(RecursiveDir)" SkipUnchangedFiles=
"true"/>
131 <Exec Condition=
"Exists('$(chmDir)s\Local')" Command='xcopy.exe
"$(chmDir)\Local\*" "$(chmDir)\Local\" /y /r'
/>
133 <!-- generate CHM-specific HTML and HH* files -->
134 <Exec Command='
"$(ProductionTools)\ChmBuilder.exe" /project:$(OutputAssembly) /html:
"$(DocOutputApiPath)\html" /lcid:
1033 /toc:
"$(TocFile)" /out:
"$(chmDir)"'
/>
136 <Exec Condition=
"'$(PresentationStyle)' == 'prototype'" Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\ReflectionToChmIndex.xsl" "$(ReflectionFile)" /out:
"$(HhkFile)"'
/>
137 <Exec Command='
"$(ProductionTools)\DBCSFix.exe" /d:$(chmDir) /l:
1033'
/>
139 <Exec Command='
"$(HHC)" "$(HhpFile)"'
IgnoreExitCode=
"true" />
141 <Copy SourceFiles=
"$(ChmDir)\$(OutputAssembly).chm" DestinationFiles=
"$(ChmFile)" />
145 DependsOnTargets=
"Build"
146 Inputs=
"$(DocOutputPath)\html\*.htm;$(TocFile)"
147 Outputs=
"$(HxsFile)">
148 <Copy SourceFiles=
"@(HxsFiles)" DestinationFiles=
"@(HxsFiles->'$(OutputPath)\%(RecursiveDir)%(FileName)%(Extension)')"/>
149 <Exec Command='
"$(DxRoot)\Presentation\shared\copyhavana.bat" $(OutputAssembly)'
/>
150 <Exec Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\CreateHxc.xsl" "$(TocFile)" /arg:
fileNamePrefix=
"$(OutputAssembly)" /out:
"$(HxcFile)"'
/>
151 <Exec Command='
"$(ProductionTools)\XslTransform.exe" /xsl:
"$(ProductionTransforms)\TocToHxSContents.xsl" "$(TocFile)" /out:
"$(HxtFile)"'
/>
152 <Exec Command='hxcomp.exe -p
"$(HxcFile)"'
IgnoreExitCode=
"true" />