Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a MonoDoc nuget package #246

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TestResult.xml
*.user
bin
obj
.DS_Store
.vs
*.metagen
*.pdb
Expand Down
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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ all: build
build: $(MDOC)

$(MDOC):
$(MSBUILD) apidoctools.sln /p:Configuration=$(CONFIGURATION);
$(MSBUILD) apidoctools.sln /r /p:Configuration=$(CONFIGURATION);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does an MSBuild NuGet restore


prepare:
git submodule update --init --recursive
nuget restore apidoctools.sln
nuget install NUnit.Console -version 3.6.0 -NoCache -o packages
nuget install NUnit.Console -version 3.8.0 -NoCache -o packages

clean:
#$(MSBUILD) apidoctools.sln /t:clean
Expand All @@ -26,6 +25,7 @@ check-mdoc:

nuget:
nuget pack mdoc/mdoc.nuspec -outputdirectory bin/Nuget
$(MSBUILD) monodoc/monodoc.csproj /p:Configuration=$(CONFIGURATION) /t:Pack
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runs the MSBuild pack target


check-monodoc:
cd monodoc; $(MAKE) check -B
11 changes: 11 additions & 0 deletions Package.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General package metadata

<PropertyGroup>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageVersion>5.6.4-alpha1</PackageVersion>
<Authors>Microsoft</Authors>
<PackageProjectUrl>https://github.com/mono/api-doc-tools</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/mono/api-doc-tools/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageTags>documentation ecmaxml dotnet .net C# F# VB.NET</PackageTags>
</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}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched this to a NuGet reference so it could be a package dependency

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 @@ -85,22 +83,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/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cleanup:
-rm -Rf Test/en.actual Test/html.actual

nunit:
mono ../packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe mdoc.Test/bin/$(CONFIGURATION)/mdoc.Test.dll
mono ../packages/NUnit.ConsoleRunner.3.8.0/tools/nunit3-console.exe mdoc.Test/bin/$(CONFIGURATION)/mdoc.Test.dll

Test/DocTest-addNonGeneric.dll:
$(CSCOMPILE) $(TEST_CSCFLAGS) -unsafe -debug -optimize -target:library -out:$@ Test/DocTest-addNonGeneric.cs
Expand Down
2 changes: 1 addition & 1 deletion mdoc/mdoc.Test/CppCxFormatterMembersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void NoSupport_DefaultParameters()
TestMethodSignature(CSharpTestLib, "Mono.DocTest.Widget", "Default", null);
}

[TestFixtureTearDown]
[OneTimeTearDown]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking NUnit API change

public void TearDown()
{
moduleCash.Clear();
Expand Down
2 changes: 1 addition & 1 deletion mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void NoSupport_Exception_ArgumentNullExceptionField()

#endregion

[TestFixtureTearDown]
[OneTimeTearDown]
public void TearDown()
{
moduleCash.Clear();
Expand Down
8 changes: 2 additions & 6 deletions mdoc/mdoc.Test/mdoc.Test.FSharp/mdoc.Test.FSharp.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,12 @@
<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 Include="FSharp.Core" Version="4.3.4" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched these to PackageReferences for consistency

<PackageReference Include="System.ValueTuple" Version="4.3.1" />
</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.
Expand Down
5 changes: 0 additions & 5 deletions mdoc/mdoc.Test/mdoc.Test.FSharp/packages.config

This file was deleted.

28 changes: 5 additions & 23 deletions mdoc/mdoc.Test/mdoc.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>Library</OutputType>
<RootNamespace>mdoc.Test</RootNamespace>
<AssemblyName>mdoc.Test</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike 4.6.1, 4.7.1 doesn't require a pile of polyfill to be netstandard 2.0 compatible

</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -28,30 +28,11 @@
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\FSharp.Core.4.3.4\lib\net45\FSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="mdoc.Test.Cplusplus, Version=1.0.6544.28971, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\external\Test\mdoc.Test.Cplusplus.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="Windows">
<HintPath>..\..\external\Windows\Windows.WinMD</HintPath>
</Reference>
Expand Down Expand Up @@ -99,14 +80,15 @@
<Compile Include="XmlUpdateTests.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="cppcli\cppcli\cppcli.h">
<Link>SampleClasses\cppcli.h</Link>
</None>
</ItemGroup>
<ItemGroup>
<!-- PrivateAssets=all is to keep VSMac happy by copying NUnit.Framework.dll -->
<PackageReference Include="NUnit" Version="3.10.1" PrivateAssets="all" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="Mono.Cecil" Version="0.10.0" PrivateAssets="all" />
<ProjectReference Include="..\mdoc.csproj">
<Project>{7DA7CD97-614F-4BCD-A2FA-B379590CEA48}</Project>
<Name>mdoc</Name>
Expand Down
6 changes: 0 additions & 6 deletions mdoc/mdoc.Test/packages.config

This file was deleted.

26 changes: 4 additions & 22 deletions mdoc/mdoc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>mdoc</RootNamespace>
<AssemblyName>mdoc</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand All @@ -34,18 +34,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.10.0-beta5\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<PackageReference Include="Mono.Cecil" Version="0.10.0" PrivateAssets="all" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are private so that they are local copied and mdoc works

<PackageReference Include="SharpZipLib" Version="1.0.0-alpha2" PrivateAssets="all" />
<Reference Include="System" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
Expand Down Expand Up @@ -168,17 +158,9 @@
<None Include="..\..\class\monodoc\Resources\mono-ecma-css.xsl">
<Link>Resources\mono-ecma-css.xsl</Link>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\external\SharpZipLib\ICSharpCode.SharpZipLib.NET45\ICSharpCode.SharpZipLib.csproj">
<Project>{0e7413ff-eb9e-4714-acf2-be3a6a7b2ffd}</Project>
<Name>ICSharpCode.SharpZipLib</Name>
</ProjectReference>
<ProjectReference Include="..\monodoc\monodoc.csproj">
<Project>{6e644802-b579-4037-9809-9cf4c7172c9d}</Project>
<Name>monodoc</Name>
</ProjectReference>
<ProjectReference Include="..\monodoc\monodoc.csproj" />
</ItemGroup>
<ItemGroup />
</Project>
4 changes: 0 additions & 4 deletions mdoc/packages.config

This file was deleted.

Binary file added mono.snk
Binary file not shown.
6 changes: 0 additions & 6 deletions monodoc/Assembly/AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion monodoc/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CONFIGURATION = Release

check:
mono ../packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe Test/bin/$(CONFIGURATION)/Monodoc.Test.dll
mono ../packages/NUnit.ConsoleRunner.3.8.0/tools/nunit3-console.exe Test/bin/$(CONFIGURATION)/net471/Monodoc.Test.dll
@echo "monodoc Tests Complete!"
6 changes: 3 additions & 3 deletions monodoc/Monodoc/generators/html/Ecmaspec2Html.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Monodoc.Generators.Html
public class Ecmaspec2Html : IHtmlExporter
{
static string css_ecmaspec;
static XslTransform ecma_transform;
static XslCompiledTransform ecma_transform;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating obsoleted API

static XsltArgumentList args = new XsltArgumentList();

public string CssCode {
Expand Down Expand Up @@ -45,7 +45,7 @@ public string Export (string input, Dictionary<string, string> extraArgs)
static string Htmlize (XPathDocument ecma_xml)
{
if (ecma_transform == null){
ecma_transform = new XslTransform ();
ecma_transform = new XslCompiledTransform ();
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly (typeof (Ecmaspec2Html));
Stream stream;
stream = assembly.GetManifestResourceStream ("ecmaspec-html-css.xsl");
Expand All @@ -58,7 +58,7 @@ static string Htmlize (XPathDocument ecma_xml)
if (ecma_xml == null) return "";

StringWriter output = new StringWriter ();
ecma_transform.Transform (ecma_xml, args, output, null);
ecma_transform.Transform (ecma_xml, args, output);

return output.ToString ();
}
Expand Down
8 changes: 4 additions & 4 deletions monodoc/Monodoc/generators/html/Toc2Html.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ namespace Monodoc.Generators.Html
{
public class Toc2Html : IHtmlExporter
{
XslTransform transform;
XslCompiledTransform transform;

public Toc2Html ()
{
transform = new XslTransform ();
transform = new XslCompiledTransform ();
var assembly = Assembly.GetAssembly (typeof (Toc2Html));
var stream = assembly.GetManifestResourceStream ("toc-html.xsl");
XmlReader xml_reader = new XmlTextReader (stream);
Expand All @@ -24,14 +24,14 @@ public Toc2Html ()
public string Export (Stream input, Dictionary<string, string> extraArgs)
{
var output = new StringWriter ();
transform.Transform (new XPathDocument (input), null, output, null);
transform.Transform (new XPathDocument (input), null, output);
return output.ToString ();
}

public string Export (string input, Dictionary<string, string> extraArgs)
{
var output = new StringWriter ();
transform.Transform (new XPathDocument (new StringReader (input)), null, output, null);
transform.Transform (new XPathDocument (new StringReader (input)), null, output);
return output.ToString ();
}

Expand Down
6 changes: 0 additions & 6 deletions monodoc/Properties/AssemblyInfo.cs

This file was deleted.

Loading