Skip to content

Commit

Permalink
Fixes documentation build errors
Browse files Browse the repository at this point in the history
When using the nuget sandcastle packages, the documentation wouldn't
build remarks or code examples. Also, if you did not have the full
sandcastle installed, VS wouldnt see it and wouldn't build it anyway, so
there was not much of a real reason to have it in the solution. This
removed it from the solution, added a batch script in the root that will
build the documentation and grab the nuget packages if people want to
build the xml docs. However normal builds will not anymore.

Fixes Appveyor yml

Bad formatting

Changes AppVeyor to release mode

Appveyor should now build nupkg after documentation

Should now properly publish nupkg

Makes AppVeyor configuration build documentation

This fixes the issue where nugets would get packed before the post build
script runs. This also means that if the user runs the build in appveyor
mode it will download the nuget packages and build the docs.

Updates after target name
  • Loading branch information
ThadHouse committed Nov 7, 2015
1 parent 318e099 commit cc9b1f7
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bld/
[Bb]in/
[Oo]bj/
[Oo]utput/
sbpackages/

# Visual Studio 2015 cache/options directory
.vs/
Expand Down
4 changes: 4 additions & 0 deletions BuildDocumentation.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nuget install EWSoftware.SHFB -Version 2015.10.10.0 -o sbpackages
nuget install EWSoftware.SHFB.NETFramework -Version 4.6 -o sbpackages

"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild" Sandcastle\SandcastleLocalBuildsOnly.shfbproj /property:Configuration=Release
4 changes: 2 additions & 2 deletions NetworkTablesCore.Test/NetworkTablesCore.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'AppVeyor|AnyCPU'">
<OutputPath>Output\</OutputPath>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DocumentationRelease|AnyCPU'">
<OutputPath>bin\DocumentationRelease\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Expand Down
2 changes: 0 additions & 2 deletions NetworkTablesCore.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EWSoftware.SHFB" version="2015.10.10.0" targetFramework="net45" />
<package id="EWSoftware.SHFB.NETFramework" version="4.6" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
</packages>
19 changes: 4 additions & 15 deletions NetworkTablesCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,25 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetworkTablesCore", "Networ
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetworkTablesCore.Test", "NetworkTablesCore.Test\NetworkTablesCore.Test.csproj", "{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}"
EndProject
Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "Sandcastle", "Sandcastle\Sandcastle.shfbproj", "{5647E833-22C8-4B86-B211-6A68B39155DE}"
ProjectSection(ProjectDependencies) = postProject
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A} = {1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}
{7BD949DB-C15F-436B-BDD4-2A47AE80A832} = {7BD949DB-C15F-436B-BDD4-2A47AE80A832}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
AppVeyor|Any CPU = AppVeyor|Any CPU
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.AppVeyor|Any CPU.ActiveCfg = AppVeyor|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.AppVeyor|Any CPU.Build.0 = AppVeyor|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.AppVeyor|Any CPU.Build.0 = Release|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BD949DB-C15F-436B-BDD4-2A47AE80A832}.Release|Any CPU.Build.0 = Release|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.AppVeyor|Any CPU.ActiveCfg = AppVeyor|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.AppVeyor|Any CPU.Build.0 = AppVeyor|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.AppVeyor|Any CPU.Build.0 = Release|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E2FCA78-FDA6-43AB-BB56-BE77C0BC701A}.Release|Any CPU.Build.0 = Release|Any CPU
{5647E833-22C8-4B86-B211-6A68B39155DE}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU
{5647E833-22C8-4B86-B211-6A68B39155DE}.AppVeyor|Any CPU.Build.0 = Release|Any CPU
{5647E833-22C8-4B86-B211-6A68B39155DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5647E833-22C8-4B86-B211-6A68B39155DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5647E833-22C8-4B86-B211-6A68B39155DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
15 changes: 6 additions & 9 deletions NetworkTablesCore/NetworkTablesCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,8 @@
<StartupObject>
</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'AppVeyor|AnyCPU'">
<OutputPath>Output\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>Output\NetworkTables.XML</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down Expand Up @@ -92,6 +85,10 @@
<EmbeddedResource Include="NativeLibraries\ntcore64.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Binary file added NuGet.exe
Binary file not shown.
6 changes: 0 additions & 6 deletions Sandcastle/Sandcastle.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
<configuration />
</PlugInConfig>
</PlugInConfigurations>
<ComponentPath>..\packages\EWSoftware.SHFB.NETFramework.4.6\tools\Data\.NETFramework\</ComponentPath>
</PropertyGroup>
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform
the build. The others are optional common platform types that may appear. -->
Expand All @@ -70,10 +69,6 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
</PropertyGroup>
<PropertyGroup>
<!-- NOTE: Update the version number in the path (YYYY.M.D.R) to match the package version -->
<SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2015.10.10.0\Tools\</SHFBROOT>
</PropertyGroup>
<ItemGroup>
<Folder Include="Content" />
<Folder Include="Content\VersionHistory" />
Expand All @@ -98,7 +93,6 @@
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>xcopy Help\NetworkTables.xml ..\NetworkTablesCore\Output /y</PostBuildEvent>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
</Project>
104 changes: 104 additions & 0 deletions Sandcastle/SandcastleLocalBuildsOnly.shfbproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- The configuration and platform will be used to determine which assemblies to include from solution and
project documentation sources -->
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>5647e833-22c8-4b86-b211-6a68b39155de</ProjectGuid>
<SHFBSchemaVersion>2015.6.5.0</SHFBSchemaVersion>
<!-- AssemblyName, Name, and RootNamespace are not used by SHFB but Visual Studio adds them anyway -->
<AssemblyName>Sandcastle</AssemblyName>
<RootNamespace>Sandcastle</RootNamespace>
<Name>Sandcastle</Name>
<!-- SHFB properties -->
<FrameworkVersion>.NET Framework 4.5</FrameworkVersion>
<OutputPath>Help\</OutputPath>
<HtmlHelpName>Sandcastle</HtmlHelpName>
<Language>en-US</Language>
<TransformComponentArguments>
<Argument Key="logoFile" Value="Help.png" xmlns="" />
<Argument Key="logoHeight" Value="" xmlns="" />
<Argument Key="logoWidth" Value="" xmlns="" />
<Argument Key="logoAltText" Value="" xmlns="" />
<Argument Key="logoPlacement" Value="left" xmlns="" />
<Argument Key="logoAlignment" Value="left" xmlns="" />
<Argument Key="maxVersionParts" Value="" xmlns="" />
</TransformComponentArguments>
<DocumentationSources>
<DocumentationSource sourceFile="..\NetworkTablesCore\NetworkTablesCore.csproj" xmlns="" />
</DocumentationSources>
<BuildAssemblerVerbosity>OnlyWarningsAndErrors</BuildAssemblerVerbosity>
<HelpFileFormat>Website</HelpFileFormat>
<IndentHtml>False</IndentHtml>
<KeepLogFile>True</KeepLogFile>
<DisableCodeBlockComponent>False</DisableCodeBlockComponent>
<CleanIntermediates>True</CleanIntermediates>
<ComponentConfigurations>
<ComponentConfig id="API Token Resolution" enabled="True">
<component id="API Token Resolution">{@TokenFiles}
<replace elements="/*//token" item="string(.)" /></component>
</ComponentConfig>
<ComponentConfig id="IntelliSense Component" enabled="True"><component id="IntelliSense Component"><!-- Output options (optional)
Attributes:
Include namespaces (false by default)
Namespaces comments filename ("Namespaces" if not specified or empty)
Output folder (current folder if not specified or empty) --><output includeNamespaces="false" namespacesFile="Namespaces" folder="{@OutputFolder}" /></component></ComponentConfig></ComponentConfigurations>
<PlugInConfigurations>
<PlugInConfig id="IntelliSense Only" enabled="True" xmlns="">
<configuration />
</PlugInConfig>
</PlugInConfigurations>
<ComponentPath>..\sbpackages\EWSoftware.SHFB.NETFramework.4.6\tools\Data\.NETFramework\</ComponentPath>
</PropertyGroup>
<!-- There are no properties for these groups. AnyCPU needs to appear in order for Visual Studio to perform
the build. The others are optional common platform types that may appear. -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
</PropertyGroup>
<PropertyGroup>
<!-- NOTE: Update the version number in the path (YYYY.M.D.R) to match the package version -->
<SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)..\sbpackages\EWSoftware.SHFB.2015.10.10.0\Tools\</SHFBROOT>
</PropertyGroup>
<ItemGroup>
<Folder Include="Content" />
<Folder Include="Content\VersionHistory" />
<Folder Include="icons" />
<Folder Include="media" />
</ItemGroup>
<ItemGroup>
<None Include="Content\VersionHistory\v1.0.0.0.aml" />
<None Include="Content\VersionHistory\VersionHistory.aml" />
<None Include="Content\Welcome.aml" />
</ItemGroup>
<ItemGroup>
<ContentLayout Include="ContentLayout.content" />
</ItemGroup>
<ItemGroup>
<Content Include="icons\Help.png" />
</ItemGroup>
<!-- Import the SHFB build targets -->
<Import Project="$(SHFBROOT)\SandcastleHelpFileBuilder.targets" />
<!-- The pre-build and post-build event properties must appear *after* the targets file import in order to be
evaluated correctly. -->
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>xcopy Help\NetworkTables.xml ..\NetworkTablesCore\Output /y</PostBuildEvent>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions after.NetworkTablesCore.sln.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--?xml version="1.0" encoding="utf-8"?-->

<Project toolsversion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="BuildDocs" AfterTargets="Build" Condition="'$(Configuration)' == 'AppVeyor' ">
<Message text="Building Documentation" importance="high"></Message>
<Exec Command="BuildDocumentation.bat"/>
</Target>
</Project>
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ test_script:
nunit-console-x86.exe %APPVEYOR_BUILD_FOLDER%\NetworkTablesCore.Test\Output\NetworkTablesCore.Test.dll /framework:net-4.0 /include:Server
nunit-console-x86.exe %APPVEYOR_BUILD_FOLDER%\NetworkTablesCore.Test\Output\NetworkTablesCore.Test.dll /framework:net-4.0 /include:Client
nunit-console-x86.exe %APPVEYOR_BUILD_FOLDER%\NetworkTablesCore.Test\Output\NetworkTablesCore.Test.dll /framework:net-4.0 /include:Client

0 comments on commit cc9b1f7

Please sign in to comment.