Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Collins <pecolli@microsoft.com>2022-07-22 03:20:54 +0300
committerGitHub <noreply@github.com>2022-07-22 03:20:54 +0300
commitc8a15bfde97b35ba55dbb0d4fdddc2ddb66084db (patch)
treea212e9c8ce088e5cb15636f25f36d48ae7f4e27e
parent461da7b8188ad1d217f82ceb4c23df049ca2f466 (diff)
[mdoc] Multitarget net471 and net6.0 (#639)
Adds `net6.0` as a target framework to mdoc. The artifacts from the `net6.0` build will be output to `bin/$(Configuration)-net6.0`. Mono.Cecil has been bumped from `0.10.0-beta5` to `0.10.0`. This update appears to have introduced a change in behavior in F# doc generation, and the expected output in `PatternMatchingExamples.xml` has been updated to reflect that. The mdoc NuGet package has been updated to include both `net471` and `net6.0` tools. This can be considered a breaking change, as the path of mdoc.exe has been changed to include a folder named after its target framework.
-rw-r--r--Directory.Build.props5
-rw-r--r--Makefile7
-rw-r--r--azure-pipelines.yml19
-rw-r--r--mdoc/Makefile5
-rw-r--r--mdoc/Mono.Documentation/Updater/Frameworks/MDocResolver.cs4
-rw-r--r--mdoc/Test/en.expected-fsharp/PatternMatching/PatternMatchingExamples.xml28
-rw-r--r--mdoc/Test/en.expected-fsharp/index.xml3
-rw-r--r--mdoc/mdoc.Test/CppCxFormatterMembersTests.cs6
-rw-r--r--mdoc/mdoc.Test/CppCxFormatterTypesTests.cs7
-rw-r--r--mdoc/mdoc.Test/CppFormatterTests.cs5
-rw-r--r--mdoc/mdoc.Test/CppFullFormatterTests.cs5
-rw-r--r--mdoc/mdoc.Test/CppWinRtFormatterTests.cs5
-rw-r--r--mdoc/mdoc.Test/CppWinRtMembersTests.cs7
-rw-r--r--mdoc/mdoc.Test/Enumeration/AttachedEntityTests.cs6
-rw-r--r--mdoc/mdoc.Test/FormatterTests.cs22
-rw-r--r--mdoc/mdoc.Test/MDocUpdaterTests.cs4
-rw-r--r--mdoc/mdoc.Test/mdoc.Test.csproj28
-rw-r--r--mdoc/mdoc.csproj11
-rw-r--r--mdoc/mdoc.nuspec3
19 files changed, 128 insertions, 52 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index 0558f4d4..80437e56 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,9 +1,10 @@
<Project>
<PropertyGroup>
<NuGetVersionFSharpCore>4.3.4</NuGetVersionFSharpCore>
- <NuGetVersionMonoCecil>0.10.0-beta5</NuGetVersionMonoCecil>
+ <NuGetVersionMonoCecil>0.10.0</NuGetVersionMonoCecil>
<NuGetVersionNUnit>3.10.1</NuGetVersionNUnit>
- <NuGetVersionNUnit3TestAdapter>3.13.0</NuGetVersionNUnit3TestAdapter>
+ <NuGetVersionNUnit3TestAdapter>3.17.0</NuGetVersionNUnit3TestAdapter>
+ <NuGetVersionMicrosoftNETTestSdk>16.11.0</NuGetVersionMicrosoftNETTestSdk>
<NuGetVersionQuickIONET>2.6.2.0</NuGetVersionQuickIONET>
<NuGetVersionSharpZipLib>1.3.3</NuGetVersionSharpZipLib>
<NuGetVersionSystemConfigurationConfigurationManager>6.0.0</NuGetVersionSystemConfigurationConfigurationManager>
diff --git a/Makefile b/Makefile
index 873be299..59360081 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-MSBUILD = msbuild
CONFIGURATION = Release
BIN = bin/$(CONFIGURATION)
MDOC = $(BIN)/mdoc.exe
@@ -9,15 +8,15 @@ all: build
build: $(MDOC)
$(MDOC):
- $(MSBUILD) apidoctools.sln /p:Configuration=$(CONFIGURATION);
+ dotnet build -v:n apidoctools.sln /p:Configuration=$(CONFIGURATION)
prepare:
git submodule update --init --recursive
- nuget restore apidoctools.sln
+ dotnet restore apidoctools.sln
nuget install NUnit.Console -version 3.6.0 -NoCache -o packages
clean:
- #$(MSBUILD) apidoctools.sln /t:clean
+ dotnet build -v:n apidoctools.sln /t:clean /p:Configuration=$(CONFIGURATION)
rm -rf bin/$(CONFIGURATION)
check: build check-monodoc check-mdoc
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index ee0a08fb..08abbfb9 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -95,12 +95,6 @@ stages:
- task: NuGetToolInstaller@1
displayName: Install NuGet Tool
- - task: Bash@3
- displayName: Run Unit and Integration Tests
- inputs:
- targetType: 'inline'
- script: 'make prepare all check CONFIGURATION=$(buildConfiguration)'
-
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
@@ -108,6 +102,19 @@ stages:
version: 2.1.x
installationPath: $(Agent.ToolsDirectory)/dotnet
+ - task: UseDotNet@2
+ displayName: 'Use .NET 6.0.x'
+ inputs:
+ packageType: sdk
+ version: 6.0.x
+ installationPath: $(Agent.ToolsDirectory)/dotnet
+
+ - task: Bash@3
+ displayName: Run Unit and Integration Tests
+ inputs:
+ targetType: 'inline'
+ script: 'make prepare all check CONFIGURATION=$(buildConfiguration)'
+
- task: EsrpCodeSigning@1
displayName: Sign executable and dll files
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
diff --git a/mdoc/Makefile b/mdoc/Makefile
index 6d4b9615..95f78e8f 100644
--- a/mdoc/Makefile
+++ b/mdoc/Makefile
@@ -61,6 +61,9 @@ cleanup:
nunit:
mono ../packages/NUnit.ConsoleRunner.3.6.0/tools/nunit3-console.exe mdoc.Test/bin/$(CONFIGURATION)/mdoc.Test.dll
+dotnet-test:
+ dotnet test mdoc.Test/bin/$(CONFIGURATION)-net6.0/mdoc.Test.dll
+
Test/DocTest-VB-Eii.dll:
$(VBCOMPILE) -out:Test/DocTest-VB-Eii.dll Test/ClassEnumerator.vb
@@ -960,5 +963,5 @@ check-doc-tools-update: check-monodocer-since-update \
check-mdoc-export-msxdoc-update \
check-mdoc-validate-update
-check: nunit check-doc-tools
+check: nunit dotnet-test check-doc-tools
@echo "mdoc Tests Complete!"
diff --git a/mdoc/Mono.Documentation/Updater/Frameworks/MDocResolver.cs b/mdoc/Mono.Documentation/Updater/Frameworks/MDocResolver.cs
index c06ae4cf..d42fc1af 100644
--- a/mdoc/Mono.Documentation/Updater/Frameworks/MDocResolver.cs
+++ b/mdoc/Mono.Documentation/Updater/Frameworks/MDocResolver.cs
@@ -564,6 +564,10 @@ namespace Mono.Documentation.Updater.Frameworks
internal AssemblyDefinition GetAssemblyInGac(AssemblyNameReference reference, ReaderParameters parameters)
{
+#if NETCOREAPP
+ return null;
+#endif //NETCOREAPP
+
if (reference.PublicKeyToken == null || reference.PublicKeyToken.Length == 0)
return null;
diff --git a/mdoc/Test/en.expected-fsharp/PatternMatching/PatternMatchingExamples.xml b/mdoc/Test/en.expected-fsharp/PatternMatching/PatternMatchingExamples.xml
index 6894bbba..c479809d 100644
--- a/mdoc/Test/en.expected-fsharp/PatternMatching/PatternMatchingExamples.xml
+++ b/mdoc/Test/en.expected-fsharp/PatternMatching/PatternMatchingExamples.xml
@@ -161,9 +161,9 @@
</Docs>
</Member>
<Member MemberName="detectZeroTuple">
- <MemberSignature Language="C#" Value="public static void detectZeroTuple (int point_0, int point_1);" />
- <MemberSignature Language="ILAsm" Value=".method public static void detectZeroTuple(int32 point_0, int32 point_1) cil managed" />
- <MemberSignature Language="F#" Value="PatternMatching.PatternMatchingExamples.detectZeroTuple : int * int -&gt; unit" Usage="PatternMatching.PatternMatchingExamples.detectZeroTuple (point_0, point_1)" />
+ <MemberSignature Language="C#" Value="public static void detectZeroTuple (int var1, int var2);" />
+ <MemberSignature Language="ILAsm" Value=".method public static void detectZeroTuple(int32 var1, int32 var2) cil managed" />
+ <MemberSignature Language="F#" Value="PatternMatching.PatternMatchingExamples.detectZeroTuple : int * int -&gt; unit" Usage="PatternMatching.PatternMatchingExamples.detectZeroTuple (var1, var2)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
@@ -172,12 +172,12 @@
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
- <Parameter Name="point_0" Type="System.Int32" />
- <Parameter Name="point_1" Type="System.Int32" />
+ <Parameter Name="var1" Type="System.Int32" />
+ <Parameter Name="var2" Type="System.Int32" />
</Parameters>
<Docs>
- <param name="point_0">To be added.</param>
- <param name="point_1">To be added.</param>
+ <param name="var1">To be added.</param>
+ <param name="var2">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
@@ -226,9 +226,9 @@
</Docs>
</Member>
<Member MemberName="function1">
- <MemberSignature Language="C#" Value="public static void function1 (int x_0, int x_1);" />
- <MemberSignature Language="ILAsm" Value=".method public static void function1(int32 x_0, int32 x_1) cil managed" />
- <MemberSignature Language="F#" Value="PatternMatching.PatternMatchingExamples.function1 : int * int -&gt; unit" Usage="PatternMatching.PatternMatchingExamples.function1 (x_0, x_1)" />
+ <MemberSignature Language="C#" Value="public static void function1 (int var1, int var2);" />
+ <MemberSignature Language="ILAsm" Value=".method public static void function1(int32 var1, int32 var2) cil managed" />
+ <MemberSignature Language="F#" Value="PatternMatching.PatternMatchingExamples.function1 : int * int -&gt; unit" Usage="PatternMatching.PatternMatchingExamples.function1 (var1, var2)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
@@ -237,12 +237,12 @@
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
- <Parameter Name="x_0" Type="System.Int32" />
- <Parameter Name="x_1" Type="System.Int32" />
+ <Parameter Name="var1" Type="System.Int32" />
+ <Parameter Name="var2" Type="System.Int32" />
</Parameters>
<Docs>
- <param name="x_0">To be added.</param>
- <param name="x_1">To be added.</param>
+ <param name="var1">To be added.</param>
+ <param name="var2">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
diff --git a/mdoc/Test/en.expected-fsharp/index.xml b/mdoc/Test/en.expected-fsharp/index.xml
index 191567c7..50fbf262 100644
--- a/mdoc/Test/en.expected-fsharp/index.xml
+++ b/mdoc/Test/en.expected-fsharp/index.xml
@@ -36,9 +36,6 @@
<AttributeName>System.Reflection.AssemblyTrademark("")</AttributeName>
</Attribute>
<Attribute>
- <AttributeName>System.Reflection.AssemblyVersion("1.0.0.0")</AttributeName>
- </Attribute>
- <Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
<Attribute>
diff --git a/mdoc/mdoc.Test/CppCxFormatterMembersTests.cs b/mdoc/mdoc.Test/CppCxFormatterMembersTests.cs
index c41cb572..94f6ee8e 100644
--- a/mdoc/mdoc.Test/CppCxFormatterMembersTests.cs
+++ b/mdoc/mdoc.Test/CppCxFormatterMembersTests.cs
@@ -1,11 +1,14 @@
using mdoc.Test.SampleClasses;
using Mono.Documentation.Updater.Formatters.CppFormatters;
-using Mono_DocTest;
using NUnit.Framework;
+#if !NETCOREAPP
+using Mono_DocTest;
using Cpp = Mono_DocTest_Generic;
+#endif // !NETCOREAPP
namespace mdoc.Test
{
+#if !NETCOREAPP
[TestFixture]
[Category("CppCx")]
public class CppCxFormatterMembersTests : BasicFormatterTests<CppCxFullMemberFormatter>
@@ -194,6 +197,7 @@ namespace mdoc.Test
TestMethodSignature(typeof(Cpp.GenericBase<>), null, "BaseMethod2");
}
}
+#endif //!NETCOREAPP
}
diff --git a/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs b/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
index 2bbd8390..62b51c4a 100644
--- a/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
+++ b/mdoc/mdoc.Test/CppCxFormatterTypesTests.cs
@@ -1,12 +1,16 @@
using System;
using Mono.Cecil;
using Mono.Documentation.Updater.Formatters.CppFormatters;
+#if !NETCOREAPP
using Mono_DocTest;
using Mono_DocTest_Generic;
+#endif //!NETCOREAPP
using NUnit.Framework;
namespace mdoc.Test
{
+#if !NETCOREAPP
+
[TestFixture]
[Category("CppCx")]
public class CppCxFormatterTypesTests : BasicFormatterTests<CppCxMemberFormatter>
@@ -259,5 +263,8 @@ namespace mdoc.Test
moduleCash.Clear();
}
}
+
+#endif //!NETCOREAPP
+
}
diff --git a/mdoc/mdoc.Test/CppFormatterTests.cs b/mdoc/mdoc.Test/CppFormatterTests.cs
index bc87eabd..4e3562fe 100644
--- a/mdoc/mdoc.Test/CppFormatterTests.cs
+++ b/mdoc/mdoc.Test/CppFormatterTests.cs
@@ -2,11 +2,14 @@
using Mono.Cecil;
using NUnit.Framework;
using Mono.Documentation.Updater.Formatters.CppFormatters;
+#if !NETCOREAPP
using Mono_DocTest_Generic;
using Mono_DocTest;
+#endif //!NETCOREAPP
namespace mdoc.Test
{
+#if !NETCOREAPP
public class CppFormatterTests : BasicFormatterTests<CppMemberFormatter>
{
#region Types
@@ -191,4 +194,6 @@ public ref class MyList1 : Mono_DocTest_Generic::GenericBase<System::Collections
}
}
+#endif //!NETCOREAPP
+
}
diff --git a/mdoc/mdoc.Test/CppFullFormatterTests.cs b/mdoc/mdoc.Test/CppFullFormatterTests.cs
index 1ad39d43..d3d41e6f 100644
--- a/mdoc/mdoc.Test/CppFullFormatterTests.cs
+++ b/mdoc/mdoc.Test/CppFullFormatterTests.cs
@@ -2,12 +2,15 @@
using Mono.Cecil;
using NUnit.Framework;
using Mono.Documentation.Updater.Formatters.CppFormatters;
+#if !NETCOREAPP
using Mono_DocTest_Generic;
using Cpp=Mono_DocTest_Generic;
using Mono_DocTest;
+#endif //!NETCOREAPP
namespace mdoc.Test
{
+#if !NETCOREAPP
public class CppFullFormatterTests: BasicFormatterTests<CppFullMemberFormatter>
{
private static readonly CppFullMemberFormatter cppFullMemberFormatter = new CppFullMemberFormatter();
@@ -327,4 +330,6 @@ generic <typename T>
return tref;
}
}
+#endif //!NETCOREAPP
+
}
diff --git a/mdoc/mdoc.Test/CppWinRtFormatterTests.cs b/mdoc/mdoc.Test/CppWinRtFormatterTests.cs
index b279dcaa..be1527cf 100644
--- a/mdoc/mdoc.Test/CppWinRtFormatterTests.cs
+++ b/mdoc/mdoc.Test/CppWinRtFormatterTests.cs
@@ -1,12 +1,15 @@
using System;
using Mono.Cecil;
using Mono.Documentation.Updater.Formatters.CppFormatters;
+#if !NETCOREAPP
using Mono_DocTest;
using Mono_DocTest_Generic;
+#endif //!NETCOREAPP
using NUnit.Framework;
namespace mdoc.Test
{
+#if !NETCOREAPP
[TestFixture]
public class CppWinRtFormatterTests : BasicFormatterTests<CppWinRtMemberFormatter>
{
@@ -208,4 +211,6 @@ class Widget : Mono_DocTest::IProcess");
TestTypeSignature(CSharpTestLib, "Mono.DocTest.Widget/NestedClass", null);
}
}
+#endif //!NETCOREAPP
+
}
diff --git a/mdoc/mdoc.Test/CppWinRtMembersTests.cs b/mdoc/mdoc.Test/CppWinRtMembersTests.cs
index 3711e8f8..7de96f9b 100644
--- a/mdoc/mdoc.Test/CppWinRtMembersTests.cs
+++ b/mdoc/mdoc.Test/CppWinRtMembersTests.cs
@@ -1,11 +1,14 @@
using mdoc.Test.SampleClasses;
using Mono.Documentation.Updater.Formatters.CppFormatters;
-using Mono_DocTest;
using NUnit.Framework;
+#if !NETCOREAPP
+using Mono_DocTest;
using Cpp = Mono_DocTest_Generic;
+#endif //!NETCOREAPP
namespace mdoc.Test
{
+#if !NETCOREAPP
[TestFixture]
public class CppWinRtMembersTests: BasicFormatterTests<CppWinRtFullMemberFormatter>
{
@@ -181,4 +184,6 @@ void LongProperty(long __set_formal);");
nameof(Cpp.GenericBase<int>.ConstDecimal));
#endregion
}
+#endif //!NETCOREAPP
+
}
diff --git a/mdoc/mdoc.Test/Enumeration/AttachedEntityTests.cs b/mdoc/mdoc.Test/Enumeration/AttachedEntityTests.cs
index 271aa81b..ac877cd6 100644
--- a/mdoc/mdoc.Test/Enumeration/AttachedEntityTests.cs
+++ b/mdoc/mdoc.Test/Enumeration/AttachedEntityTests.cs
@@ -1,11 +1,14 @@
using NUnit.Framework;
using System;
using System.Linq;
+#if !NETCOREAPP
using Windows.UI.Xaml;
+#endif //!NETCOREAPP
using Mono.Documentation.Util;
using Mono.Documentation.Updater;
using Mono.Documentation.Updater.Formatters;
+#if !NETCOREAPP
namespace mdoc.Test.Enumeration
{
[TestFixture]
@@ -166,4 +169,5 @@ namespace mdoc.Test.Enumeration
}
}
}
-}
+}
+#endif //!NETCOREAPP
diff --git a/mdoc/mdoc.Test/FormatterTests.cs b/mdoc/mdoc.Test/FormatterTests.cs
index 0c442f02..d306b51a 100644
--- a/mdoc/mdoc.Test/FormatterTests.cs
+++ b/mdoc/mdoc.Test/FormatterTests.cs
@@ -322,14 +322,20 @@ namespace mdoc.Test
Object[] parametors1 = new Object[] { member, sig };
mInfo1.Invoke(null, parametors1);
sig = (string)parametors1[1];
- Assert.AreEqual("3.1415926535897931", sig);
+ var piValue = "3.1415926535897931";
+
+#if NETCOREAPP
+ piValue = "3.141592653589793";
+#endif //NETCOREAPP
+
+ Assert.AreEqual(piValue, sig);
Type type2 = typeof(ILFullMemberFormatter);
sig = "";
MethodInfo mInfo2 = type2.GetMethod("AppendFieldValue", flags);
Object[] parametors2 = new Object[] { new StringBuilder(), member};
sig = mInfo2.Invoke(null, parametors2).ToString();
- Assert.AreEqual(" = (3.1415926535897931)", sig);
+ Assert.AreEqual($" = ({piValue})", sig);
Type type3 = typeof(DocUtils);
sig = "";
@@ -337,14 +343,14 @@ namespace mdoc.Test
Object[] parametors3 = new Object[] { new StringBuilder(), member };
mInfo3.Invoke(null, parametors3);
sig = parametors3[0].ToString();
- Assert.AreEqual(" = 3.1415926535897931", sig);
+ Assert.AreEqual($" = {piValue}", sig);
Type type4 = typeof(CppFullMemberFormatter);
sig = "";
MethodInfo mInfo4 = type4.GetMethod("AppendFieldValue", flags);
Object[] parametors4 = new Object[] { new StringBuilder(), member };
sig = mInfo4.Invoke(null, parametors4).ToString();
- Assert.AreEqual(" = 3.1415926535897931", sig);
+ Assert.AreEqual($" = {piValue}", sig);
}
[Test]
@@ -370,7 +376,13 @@ namespace mdoc.Test
[Test]
public void MissSignature()
{
- var member1 = GetMethod(typeof(System.IO.FileStream), m => m.FullName == "System.Void System.IO.FileStream::.ctor(System.String,System.IO.FileMode,System.Security.AccessControl.FileSystemRights,System.IO.FileShare,System.Int32,System.IO.FileOptions,System.Security.AccessControl.FileSecurity)"); ;
+ var fileStreamSig = "System.Void System.IO.FileStream::.ctor(System.String,System.IO.FileMode,System.Security.AccessControl.FileSystemRights,System.IO.FileShare,System.Int32,System.IO.FileOptions,System.Security.AccessControl.FileSecurity)";
+
+#if NETCOREAPP
+ fileStreamSig = "System.Void System.IO.FileStream::.ctor(System.String,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,System.Int32,System.IO.FileOptions)";
+#endif //NETCOREAPP
+
+ var member1 = GetMethod(typeof(System.IO.FileStream), m => m.FullName == fileStreamSig);
var fomatter1 = new VBMemberFormatter();
// Original return null
var sig1 = fomatter1.GetDeclaration(member1);
diff --git a/mdoc/mdoc.Test/MDocUpdaterTests.cs b/mdoc/mdoc.Test/MDocUpdaterTests.cs
index 4f52a7d8..a0709cd7 100644
--- a/mdoc/mdoc.Test/MDocUpdaterTests.cs
+++ b/mdoc/mdoc.Test/MDocUpdaterTests.cs
@@ -10,7 +10,9 @@ using Mono.Documentation.Updater;
using Mono.Documentation.Updater.Formatters;
using Mono.Documentation.Updater.Frameworks;
using NUnit.Framework;
+#if !NETCOREAPP
using Cpp = Mono_DocTest_Generic;
+#endif //!NETCOREAPP
namespace mdoc.Test
{
@@ -39,6 +41,7 @@ namespace mdoc.Test
Assert.IsNull(GetNativeIntegerAttr(method.Parameters[2]));
}
+#if !NETCOREAPP
[Test]
public void Test_GetDocParameterType_CppGenericParameterType_ReturnsTypeWithGenericParameters()
{
@@ -48,6 +51,7 @@ namespace mdoc.Test
Assert.AreEqual("Mono_DocTest_Generic.GenericBase<U>", parameterType);
}
+#endif //!NETCOREAPP
[TestCase("UnsafeCombine", "delegate*<T1, T2, R>")]
[TestCase("UnsafeCombineOverload", "delegate*<System.IntPtr, System.UIntPtr, R>")]
diff --git a/mdoc/mdoc.Test/mdoc.Test.csproj b/mdoc/mdoc.Test/mdoc.Test.csproj
index 422b12fe..5c5f87f7 100644
--- a/mdoc/mdoc.Test/mdoc.Test.csproj
+++ b/mdoc/mdoc.Test/mdoc.Test.csproj
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net471</TargetFramework>
+ <TargetFrameworks>net471;net6.0</TargetFrameworks>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG;</DefineConstants>
- <LangVersion>latest</LangVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release</OutputPath>
<LangVersion>latest</LangVersion>
- </PropertyGroup>
- <PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
</PropertyGroup>
- <ItemGroup>
+
+ <PropertyGroup Condition=" '$(TargetFramework)' == 'net471' ">
+ <OutputPath>bin\$(Configuration)</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(TargetFramework)' != 'net471' ">
+ <OutputPath>bin\$(Configuration)-$(TargetFramework)</OutputPath>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(TargetFramework)' == 'net471' ">
<Reference Include="mdoc.Test.Cplusplus, Version=1.0.6709.28740, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\external\Test\mdoc.Test.Cplusplus.dll</HintPath>
@@ -37,10 +37,14 @@
<HintPath>..\..\external\Windows\Windows.Foundation.UniversalApiContract.winmd</HintPath>
</Reference>
</ItemGroup>
+
<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="$(NuGetVersionMonoCecil)" />
<PackageReference Include="NUnit" Version="$(NuGetVersionNUnit)" />
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(NuGetVersionMicrosoftNETTestSdk)" />
+ <PackageReference Include="NUnit3TestAdapter" Version="$(NuGetVersionNUnit3TestAdapter)" />
</ItemGroup>
+
<ItemGroup>
<None Update="cppcli\cppcli\cppcli.h">
<Link>SampleClasses\cppcli.h</Link>
diff --git a/mdoc/mdoc.csproj b/mdoc/mdoc.csproj
index f0051cc0..267427af 100644
--- a/mdoc/mdoc.csproj
+++ b/mdoc/mdoc.csproj
@@ -1,13 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net471</TargetFramework>
+ <TargetFrameworks>net471;net6.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+ <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
+ <AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(TargetFramework)' == 'net471' ">
<OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)</OutputPath>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(TargetFramework)' != 'net471' ">
+ <OutputPath>$(MSBuildThisFileDirectory)..\bin\$(Configuration)-$(TargetFramework)</OutputPath>
+ </PropertyGroup>
+
<ItemGroup>
<Compile Remove="mdoc.Test\**" />
<Compile Remove="Test\**" />
diff --git a/mdoc/mdoc.nuspec b/mdoc/mdoc.nuspec
index a491afc9..2885e518 100644
--- a/mdoc/mdoc.nuspec
+++ b/mdoc/mdoc.nuspec
@@ -14,6 +14,7 @@
<tags>mdoc documentation ecmaxml dotnet .net C# F# VB.NET</tags>
</metadata>
<files>
- <file src="..\bin\Release\*.*" target="tools" />
+ <file src="..\bin\Release\*.*" target="tools\net471\" />
+ <file src="..\bin\Release-net6.0\*.*" target="tools\net6.0\" />
</files>
</package> \ No newline at end of file