diff --git a/core/TypeAlias.Tests/TypeAlias.Tests.xproj b/core/TypeAlias.Tests/TypeAlias.Tests.xproj index e32a347..2215410 100644 --- a/core/TypeAlias.Tests/TypeAlias.Tests.xproj +++ b/core/TypeAlias.Tests/TypeAlias.Tests.xproj @@ -9,9 +9,8 @@ b32a6975-5eee-4154-8cae-354ac9bde273 TypeAlias.Tests ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/core/TypeAlias.Tests/TypeAliasTableTest.cs b/core/TypeAlias.Tests/TypeAliasTableTest.cs index 792dd06..9acbf80 100644 --- a/core/TypeAlias.Tests/TypeAliasTableTest.cs +++ b/core/TypeAlias.Tests/TypeAliasTableTest.cs @@ -41,6 +41,14 @@ private TypeAliasTable CreateTypeAliasTable() return new TypeAliasTable(); } + private Assembly GetAssembly() + { +#if COREFX + return GetType().GetTypeInfo().Assembly; +#else + return GetType().Assembly; +#endif + } [Test] public void Test_GetType_Hit() { @@ -95,14 +103,14 @@ public void Test_AddTypeAlias_UsingCalculatedAlias() [Test] public void Test_CreateTable_WithCustomAssemblies() { - var table = new TypeAliasTable(new[] { GetType().Assembly }); + var table = new TypeAliasTable(new[] { GetAssembly() }); Assert.AreEqual(typeof(AliceClass), table.GetType(1)); } [Test] public void Test_CreateTable_WithFilter() { - var table = new TypeAliasTable(new[] { GetType().Assembly }, + var table = new TypeAliasTable(new[] { GetAssembly() }, t => t.Name.StartsWith("Alice") == false); Assert.AreEqual(null, table.GetType(1)); Assert.AreEqual(typeof(BobClass), table.GetType(2)); @@ -111,7 +119,7 @@ public void Test_CreateTable_WithFilter() [Test] public void Test_CreateTable_WithCustomResolveAutoAlias() { - var table = new TypeAliasTable(new[] { GetType().Assembly }, + var table = new TypeAliasTable(new[] { GetAssembly() }, null, t => t.Name.Length); Assert.AreEqual(typeof(AliceClass), table.GetType(1)); diff --git a/core/TypeAlias.Tests/project.json b/core/TypeAlias.Tests/project.json index 0f020f8..1ea189b 100644 --- a/core/TypeAlias.Tests/project.json +++ b/core/TypeAlias.Tests/project.json @@ -1,7 +1,7 @@ { "dependencies": { "TypeAlias": { "target": "project" }, - "NUnit": "3.0.0-*" + "NUnit": "3.4.0-*" }, "frameworks": { "net20": { @@ -10,18 +10,16 @@ }, "net40": { }, - "dnx451": { - }, "dnxcore50": { - "compilationOptions": { + "buildOptions": { "define": [ "COREFX" ] }, "dependencies": { - "System.Reflection": "4.1.0-beta-23516", - "System.Reflection.Extensions": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Collections.Concurrent": "4.0.11-beta-23516", - "System.Runtime.InteropServices": "4.0.21-beta-23516" + "System.Reflection": "4.1.0", + "System.Reflection.Extensions": "4.0.1", + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Runtime.InteropServices": "4.1.0" } } } diff --git a/core/TypeAlias/TypeAlias.xproj b/core/TypeAlias/TypeAlias.xproj index 169f288..781437d 100644 --- a/core/TypeAlias/TypeAlias.xproj +++ b/core/TypeAlias/TypeAlias.xproj @@ -9,9 +9,8 @@ fd2d68eb-ddc6-4725-b012-3b6102bf18f1 TypeAlias ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/core/TypeAlias/project.json b/core/TypeAlias/project.json index 848f75d..f5164f8 100644 --- a/core/TypeAlias/project.json +++ b/core/TypeAlias/project.json @@ -5,7 +5,7 @@ "net20": { "frameworkAssemblies": { }, - "compilationOptions": { + "buildOptions": { }, "dependencies": { "NetLegacySupport.ConcurrentDictionary": "1.1.0" @@ -14,7 +14,7 @@ "net35": { "frameworkAssemblies": { }, - "compilationOptions": { + "buildOptions": { }, "dependencies": { "NetLegacySupport.ConcurrentDictionary": "1.1.0" @@ -23,19 +23,19 @@ "net40": { "frameworkAssemblies": { }, - "compilationOptions": { + "buildOptions": { } }, - "dotnet5.2": { - "compilationOptions": { + "netstandard1.2": { + "buildOptions": { "define": [ "COREFX" ] }, "dependencies": { - "System.Reflection": "4.1.0-beta-23516", - "System.Reflection.Extensions": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Collections.Concurrent": "4.0.11-beta-23516", - "System.Runtime.InteropServices": "4.0.21-beta-23516" + "System.Reflection": "4.1.0", + "System.Reflection.Extensions": "4.0.1", + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Runtime.InteropServices": "4.1.0" } } }