Skip to content

Commit

Permalink
Build improvements (#591)
Browse files Browse the repository at this point in the history
* HtmlGenerator: Load converters lazily

This is a workaround so that .NET 6 apps can use the .NET FW
build of monodoc.dll without worrying about TypeInitializationExceptions
for converters they don't use.

* Fix netstandard2.0 compatibility

* Replace SharpZipLib submodule with package reference

Remove mdoc/packages.config as well.

* Bump Lucene.Net.Light to latest version to support NetStandard

* monodoc: Change to SDK-style project

* monodoc: Move to netstandard2.0

* Replace all packages.config with PackageReference

Bump mdoc.Test.FSharp.fsproj to .NET 4.7.1 to fix issues using
System.ValueTuple.

* Adjust to mdoc.Test.FSharp.fsproj bump to v4.7.1

* mdoc.Test.FSharp.fsproj: Convert to SDK-style

Fixes errors building in VS2022.

* mdoc.Test.csproj: Update to SDK-style too

* mdoc.Test.csproj no longer needs a direct FSharp.Core reference

* mdoc.Test.FSharp.fsproj: Fix FSharp.Core reference

https://github.com/dotnet/fsharp/blob/main/docs/fsharp-core-notes.md#how-to-explicitly-reference-fsharpcore

* mdoc.Test.csproj: Restore manual WPF reference

* Use AppendTargetFrameworkToOutputPath to avoid touching Makefiles

* Update en.expected-fsharp/index.xml
  • Loading branch information
sandyarmstrong authored Jan 9, 2022
1 parent dd3404f commit 6237fdb
Show file tree
Hide file tree
Showing 21 changed files with 80 additions and 803 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "external/SharpZipLib"]
path = external/SharpZipLib
url = https://github.com/icsharpcode/SharpZipLib.git
[submodule "external/Lucene.Net.Light"]
path = external/Lucene.Net.Light
url = https://github.com/mono/Lucene.Net.Light.git
11 changes: 11 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>
<PropertyGroup>
<NuGetVersionFSharpCore>4.3.4</NuGetVersionFSharpCore>
<NuGetVersionMonoCecil>0.10.0-beta5</NuGetVersionMonoCecil>
<NuGetVersionNUnit>3.10.1</NuGetVersionNUnit>
<NuGetVersionNUnit3TestAdapter>3.13.0</NuGetVersionNUnit3TestAdapter>
<NuGetVersionQuickIONET>2.6.2.0</NuGetVersionQuickIONET>
<NuGetVersionSharpZipLib>1.3.3</NuGetVersionSharpZipLib>
<NuGetVersionSystemConfigurationConfigurationManager>6.0.0</NuGetVersionSystemConfigurationConfigurationManager>
</PropertyGroup>
</Project>
18 changes: 0 additions & 18 deletions apidoctools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monodoc", "monodoc\monodoc.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monodoc.Test", "monodoc\Test\Monodoc.Test.csproj", "{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpZipLib", "external\SharpZipLib\ICSharpCode.SharpZipLib.NET45\ICSharpCode.SharpZipLib.csproj", "{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mdoc.Test", "mdoc\mdoc.Test\mdoc.Test.csproj", "{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "mdoc.Test.FSharp", "mdoc\mdoc.Test\mdoc.Test.FSharp\mdoc.Test.FSharp.fsproj", "{979F9F80-12FE-4236-9E93-6D554AB13701}"
Expand Down Expand Up @@ -75,22 +73,6 @@ Global
{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}.Release|x64.Build.0 = Release|Any CPU
{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}.Release|x86.ActiveCfg = Release|Any CPU
{1EE70E2C-A289-4C36-AD0A-3D0C6CE56615}.Release|x86.Build.0 = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|ARM.Build.0 = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x64.ActiveCfg = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x64.Build.0 = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x86.ActiveCfg = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Debug|x86.Build.0 = Debug|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|Any CPU.Build.0 = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|ARM.ActiveCfg = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|ARM.Build.0 = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x64.ActiveCfg = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x64.Build.0 = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x86.ActiveCfg = Release|Any CPU
{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}.Release|x86.Build.0 = Release|Any CPU
{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5ADDEFB6-930C-46BC-8B2B-FDE5C7E3B5AD}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion external/Lucene.Net.Light
1 change: 0 additions & 1 deletion external/SharpZipLib
Submodule SharpZipLib deleted from 9ad7f5
2 changes: 1 addition & 1 deletion mdoc/Test/en.expected-fsharp-wsl/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<AttributeName>System.Runtime.InteropServices.Guid("979f9f80-12fe-4236-9e93-6d554ab13701")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.1", FrameworkDisplayName=".NET Framework 4.6.1")</AttributeName>
<AttributeName>System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName=".NET Framework 4.7.1")</AttributeName>
</Attribute>
</Attributes>
</Assembly>
Expand Down
4 changes: 2 additions & 2 deletions mdoc/Test/en.expected-fsharp/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AttributeName>Microsoft.FSharp.Core.FSharpInterfaceDataVersion(2, 0, 0)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.None)</AttributeName>
<AttributeName>System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute+DebuggingModes.Default | System.Diagnostics.DebuggableAttribute+DebuggingModes.IgnoreSymbolStoreSequencePoints)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Reflection.AssemblyCompany("EPAM Systems")</AttributeName>
Expand Down Expand Up @@ -45,7 +45,7 @@
<AttributeName>System.Runtime.InteropServices.Guid("979f9f80-12fe-4236-9e93-6d554ab13701")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.1", FrameworkDisplayName=".NET Framework 4.6.1")</AttributeName>
<AttributeName>System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName=".NET Framework 4.7.1")</AttributeName>
</Attribute>
</Attributes>
</Assembly>
Expand Down
69 changes: 5 additions & 64 deletions mdoc/mdoc.Test/mdoc.Test.FSharp/mdoc.Test.FSharp.fsproj
Original file line number Diff line number Diff line change
@@ -1,58 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>979f9f80-12fe-4236-9e93-6d554ab13701</ProjectGuid>
<TargetFramework>net471</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>mdoc.Test.FSharp</RootNamespace>
<AssemblyName>mdoc.Test.FSharp</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Name>mdoc.Test.FSharp</Name>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>bin\$(Configuration)\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '11.0'">
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') ">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') ">
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Import Project="$(FSharpTargetsPath)" />
<ItemGroup>
<Compile Include="AssemblyInfo.fs" />
<None Include="Script.fsx" />
<Content Include="packages.config" />
<Compile Include="AbstractClasses.fs" />
<Compile Include="Accessibility.fs" />
<Compile Include="AccessibilityTest.fs" />
Expand Down Expand Up @@ -94,22 +51,6 @@
<Compile Include="Library1.fs" />
</ItemGroup>
<ItemGroup>
<Reference Include="FSharp.Core">
<HintPath>..\..\..\packages\FSharp.Core.4.3.4\lib\net45\FSharp.Core.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<PackageReference Update="FSharp.Core" Version="$(NuGetVersionFSharpCore)" />
</ItemGroup>
<!-- 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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
5 changes: 0 additions & 5 deletions mdoc/mdoc.Test/mdoc.Test.FSharp/packages.config

This file was deleted.

Loading

0 comments on commit 6237fdb

Please sign in to comment.