From 4ffe2747d42193f48199a4f78b60a03e23954d13 Mon Sep 17 00:00:00 2001 From: Steven Knox Date: Fri, 22 Mar 2019 13:03:27 +0000 Subject: [PATCH] Convert to netstandard2.0 and upgrade to use .Net CLI --- src/.vscode/launch.json | 26 +++ src/.vscode/tasks.json | 15 ++ .../Properties/AssemblyInfo.cs | 2 +- .../Takenet.Textc.Extensions.Redis.csproj | 76 ++------- src/Takenet.Textc.Samples/App.config | 6 - src/Takenet.Textc.Samples/Program.cs | 152 +++++++++--------- .../Properties/AssemblyInfo.cs | 36 ----- .../Takenet.Textc.Samples.csproj | 73 ++------- .../Properties/AssemblyInfo.cs | 36 ----- .../RequestContextTests.cs | 2 +- .../Takenet.Textc.UnitTests.csproj | 99 +++--------- .../TextProcessorTests.cs | 8 +- .../DoubleMetaphoneWordTokenTypeTests.cs | 2 +- .../Types/SoundexWordTokenTypeTests.cs | 2 +- .../Types/TokenTypeTestsBase.cs | 2 +- src/Takenet.Textc.UnitTests/app.config | 8 - src/Takenet.Textc.UnitTests/packages.config | 7 - src/Takenet.Textc.sln | 87 +++++++--- src/Takenet.Textc/Csdl/CsdlParser.cs | 10 +- src/Takenet.Textc/Properties/AssemblyInfo.cs | 4 +- src/Takenet.Textc/Takenet.Textc.csproj | 129 ++------------- src/Takenet.Textc/packages.config | 4 - 22 files changed, 247 insertions(+), 539 deletions(-) create mode 100644 src/.vscode/launch.json create mode 100644 src/.vscode/tasks.json delete mode 100644 src/Takenet.Textc.Samples/App.config delete mode 100644 src/Takenet.Textc.Samples/Properties/AssemblyInfo.cs delete mode 100644 src/Takenet.Textc.UnitTests/Properties/AssemblyInfo.cs delete mode 100644 src/Takenet.Textc.UnitTests/app.config delete mode 100644 src/Takenet.Textc.UnitTests/packages.config delete mode 100644 src/Takenet.Textc/packages.config diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json new file mode 100644 index 0000000..40ad2c2 --- /dev/null +++ b/src/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/Takenet.Textc.Samples/bin/Debug/netcoreapp2.1/Takenet.Textc.Samples.dll", + "args": [], + "cwd": "${workspaceFolder}/Takenet.Textc.Samples", + "console": "externalTerminal", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart" + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/src/.vscode/tasks.json b/src/.vscode/tasks.json new file mode 100644 index 0000000..278820f --- /dev/null +++ b/src/.vscode/tasks.json @@ -0,0 +1,15 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Takenet.Textc.Samples/Takenet.Textc.Samples.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/src/Takenet.Textc.Extensions.Redis/Properties/AssemblyInfo.cs b/src/Takenet.Textc.Extensions.Redis/Properties/AssemblyInfo.cs index 0b8caf6..b3c7e8e 100644 --- a/src/Takenet.Textc.Extensions.Redis/Properties/AssemblyInfo.cs +++ b/src/Takenet.Textc.Extensions.Redis/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/src/Takenet.Textc.Extensions.Redis/Takenet.Textc.Extensions.Redis.csproj b/src/Takenet.Textc.Extensions.Redis/Takenet.Textc.Extensions.Redis.csproj index f815388..1b8930d 100644 --- a/src/Takenet.Textc.Extensions.Redis/Takenet.Textc.Extensions.Redis.csproj +++ b/src/Takenet.Textc.Extensions.Redis/Takenet.Textc.Extensions.Redis.csproj @@ -1,72 +1,16 @@ - - - + + - Debug - AnyCPU - {6F398506-FC95-45E1-B9AD-1E4A205C33FA} - Library - Properties - Takenet.Textc.Extensions.Redis - Takenet.Textc.Extensions.Redis - v4.5.1 - 512 + netstandard2.0;net451 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - True - - - ..\packages\StackExchange.Redis.1.0.488\lib\net45\StackExchange.Redis.dll - True - - - - - - - - - - - - - - + - - {875df2a3-f0cd-4245-820b-ca0caf0565a6} - Takenet.Textc - + + - - + - - - \ No newline at end of file + + diff --git a/src/Takenet.Textc.Samples/App.config b/src/Takenet.Textc.Samples/App.config deleted file mode 100644 index 9c05822..0000000 --- a/src/Takenet.Textc.Samples/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/Takenet.Textc.Samples/Program.cs b/src/Takenet.Textc.Samples/Program.cs index 65d4743..f2924ef 100644 --- a/src/Takenet.Textc.Samples/Program.cs +++ b/src/Takenet.Textc.Samples/Program.cs @@ -1,81 +1,81 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -using Takenet.Textc.Csdl; -using Takenet.Textc.Processors; - -namespace Takenet.Textc.Samples -{ - class Program - { - static void Main(string[] args) - { - MainAsync(args).Wait(); - } - - static async Task MainAsync(string[] args) - { - ITextProcessor textProcessor; - - Console.WriteLine("Select the sample: "); - Console.WriteLine("1. Calculator"); - Console.WriteLine("2. Calendar"); - Console.WriteLine("3. Pizza"); - - switch (Console.ReadLine()??"".Trim()) - { - case "2": - Console.WriteLine("Starting the calendar..."); - textProcessor = Calendar2.CreateTextProcessor(); - break; - - case "3": - Console.WriteLine("Starting the pizza..."); - textProcessor = Pizza.CreateTextProcessor(); - break; - - default: - Console.WriteLine("Starting the calculator..."); - textProcessor = Calculator.CreateTextProcessor(); - break; +using System; +using System.Diagnostics; +using System.Threading; +using System.Threading.Tasks; +using Takenet.Textc.Csdl; +using Takenet.Textc.Processors; + +namespace Takenet.Textc.Samples +{ + class Program + { + static async Task Main(string[] args) + { + await MainAsync(args); + } + + static async Task MainAsync(string[] args) + { + ITextProcessor textProcessor; + + Console.WriteLine("Select the sample: "); + Console.WriteLine("1. Calculator"); + Console.WriteLine("2. Calendar"); + Console.WriteLine("3. Pizza"); + + switch (Console.ReadLine()??"".Trim()) + { + case "2": + Console.WriteLine("Starting the calendar..."); + textProcessor = Calendar2.CreateTextProcessor(); + break; + + case "3": + Console.WriteLine("Starting the pizza..."); + textProcessor = Pizza.CreateTextProcessor(); + break; + + default: + Console.WriteLine("Starting the calculator..."); + textProcessor = Calculator.CreateTextProcessor(); + break; } Console.Clear(); // Creates an empty context - var context = new RequestContext(); - - string inputText; - do - { - Console.WriteLine(); - Console.Write("> "); - inputText = Console.ReadLine(); - - var sw = Stopwatch.StartNew(); - - try - { - await textProcessor.ProcessAsync(inputText, context, CancellationToken.None); - } - catch (MatchNotFoundException) - { - Console.WriteLine("There's no match for the specified input"); - } - catch (ArgumentException) - { - break; - } - - sw.Stop(); - -#if DEBUG - Console.WriteLine("Elapsed: {0} ms ({1} ticks)", sw.ElapsedMilliseconds, sw.ElapsedTicks); -#endif - - } while (!string.IsNullOrWhiteSpace(inputText)); - - } - } -} + var context = new RequestContext(); + + string inputText; + do + { + Console.WriteLine(); + Console.Write("> "); + inputText = Console.ReadLine(); + + var sw = Stopwatch.StartNew(); + + try + { + await textProcessor.ProcessAsync(inputText, context, CancellationToken.None); + } + catch (MatchNotFoundException) + { + Console.WriteLine("There's no match for the specified input"); + } + catch (ArgumentException) + { + break; + } + + sw.Stop(); + +#if DEBUG + Console.WriteLine("Elapsed: {0} ms ({1} ticks)", sw.ElapsedMilliseconds, sw.ElapsedTicks); +#endif + + } while (!string.IsNullOrWhiteSpace(inputText)); + + } + } +} diff --git a/src/Takenet.Textc.Samples/Properties/AssemblyInfo.cs b/src/Takenet.Textc.Samples/Properties/AssemblyInfo.cs deleted file mode 100644 index 93cb82d..0000000 --- a/src/Takenet.Textc.Samples/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Takenet.Text.Samples")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Takenet.Text.Samples")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cce0d32d-1adb-4af7-8159-5f08bdbdf8b3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Takenet.Textc.Samples/Takenet.Textc.Samples.csproj b/src/Takenet.Textc.Samples/Takenet.Textc.Samples.csproj index f5a64fb..645e2fb 100644 --- a/src/Takenet.Textc.Samples/Takenet.Textc.Samples.csproj +++ b/src/Takenet.Textc.Samples/Takenet.Textc.Samples.csproj @@ -1,70 +1,17 @@ - - - + + - Debug - AnyCPU - {CCE0D32D-1ADB-4AF7-8159-5F08BDBDF8B3} Exe - Properties - Takenet.Textc.Samples - Takenet.Textc.Samples - v4.5.1 - 512 - true + netcoreapp2.1 + latest - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - + - + - - {875DF2A3-F0CD-4245-820B-CA0CAF0565A6} - Takenet.Textc - + + - - - \ No newline at end of file + + diff --git a/src/Takenet.Textc.UnitTests/Properties/AssemblyInfo.cs b/src/Takenet.Textc.UnitTests/Properties/AssemblyInfo.cs deleted file mode 100644 index 192ff73..0000000 --- a/src/Takenet.Textc.UnitTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Takenet.Text.UnitTests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Takenet.Text.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a06a6af3-b92b-4b2f-b5a6-c68c62ca6e88")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Takenet.Textc.UnitTests/RequestContextTests.cs b/src/Takenet.Textc.UnitTests/RequestContextTests.cs index c4407b6..49a2cfe 100644 --- a/src/Takenet.Textc.UnitTests/RequestContextTests.cs +++ b/src/Takenet.Textc.UnitTests/RequestContextTests.cs @@ -1,7 +1,7 @@ using System; using NFluent; using NUnit.Framework; -using Ploeh.AutoFixture; +using AutoFixture; namespace Takenet.Textc.UnitTests { diff --git a/src/Takenet.Textc.UnitTests/Takenet.Textc.UnitTests.csproj b/src/Takenet.Textc.UnitTests/Takenet.Textc.UnitTests.csproj index a7cd1f9..13ca075 100644 --- a/src/Takenet.Textc.UnitTests/Takenet.Textc.UnitTests.csproj +++ b/src/Takenet.Textc.UnitTests/Takenet.Textc.UnitTests.csproj @@ -1,86 +1,29 @@ - - - + + - Debug - AnyCPU - {A06A6AF3-B92B-4B2F-B5A6-C68C62CA6E88} - Library - Properties - Takenet.Textc.UnitTests - Takenet.Textc.UnitTests - v4.5.1 - 512 + netcoreapp2.1 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\NFluent.1.3.1.0\lib\net40\NFluent.dll - True - - - ..\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll - - - ..\packages\AutoFixture.3.37.3\lib\net40\Ploeh.AutoFixture.dll - True - - - - - - - - - - + - - - - - - - - + - - {875df2a3-f0cd-4245-820b-ca0caf0565a6} - Takenet.Textc - + + + - - Designer - - + + + + + - - - - - - \ No newline at end of file + + + portable + True + 1701;1702;1705,NU1701,NU1603 + + + diff --git a/src/Takenet.Textc.UnitTests/TextProcessorTests.cs b/src/Takenet.Textc.UnitTests/TextProcessorTests.cs index 1569276..d5601c9 100644 --- a/src/Takenet.Textc.UnitTests/TextProcessorTests.cs +++ b/src/Takenet.Textc.UnitTests/TextProcessorTests.cs @@ -6,11 +6,11 @@ namespace Takenet.Textc.UnitTests [TestFixture] public class TextProcessorTests { - [Test] - public async Task ProcessAsync_ValidInput_CallsCommandProcessor() - { + // [Test] + // public async Task ProcessAsync_ValidInput_CallsCommandProcessor() + // { - } + // } } } diff --git a/src/Takenet.Textc.UnitTests/Types/DoubleMetaphoneWordTokenTypeTests.cs b/src/Takenet.Textc.UnitTests/Types/DoubleMetaphoneWordTokenTypeTests.cs index f40a955..0b7a6d7 100644 --- a/src/Takenet.Textc.UnitTests/Types/DoubleMetaphoneWordTokenTypeTests.cs +++ b/src/Takenet.Textc.UnitTests/Types/DoubleMetaphoneWordTokenTypeTests.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using NFluent; using NUnit.Framework; -using Ploeh.AutoFixture; +using AutoFixture; using Takenet.Textc.Types; namespace Takenet.Textc.UnitTests.Types diff --git a/src/Takenet.Textc.UnitTests/Types/SoundexWordTokenTypeTests.cs b/src/Takenet.Textc.UnitTests/Types/SoundexWordTokenTypeTests.cs index 8cf9ce2..96da339 100644 --- a/src/Takenet.Textc.UnitTests/Types/SoundexWordTokenTypeTests.cs +++ b/src/Takenet.Textc.UnitTests/Types/SoundexWordTokenTypeTests.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using NFluent; using NUnit.Framework; -using Ploeh.AutoFixture; +using AutoFixture; using Takenet.Textc.Types; namespace Takenet.Textc.UnitTests.Types diff --git a/src/Takenet.Textc.UnitTests/Types/TokenTypeTestsBase.cs b/src/Takenet.Textc.UnitTests/Types/TokenTypeTestsBase.cs index 9c482cf..13cefa2 100644 --- a/src/Takenet.Textc.UnitTests/Types/TokenTypeTestsBase.cs +++ b/src/Takenet.Textc.UnitTests/Types/TokenTypeTestsBase.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Ploeh.AutoFixture; +using AutoFixture; using Takenet.Textc.Types; namespace Takenet.Textc.UnitTests.Types diff --git a/src/Takenet.Textc.UnitTests/app.config b/src/Takenet.Textc.UnitTests/app.config deleted file mode 100644 index cc74595..0000000 --- a/src/Takenet.Textc.UnitTests/app.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/Takenet.Textc.UnitTests/packages.config b/src/Takenet.Textc.UnitTests/packages.config deleted file mode 100644 index 851da0b..0000000 --- a/src/Takenet.Textc.UnitTests/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/Takenet.Textc.sln b/src/Takenet.Textc.sln index b707434..b2d8749 100644 --- a/src/Takenet.Textc.sln +++ b/src/Takenet.Textc.sln @@ -1,47 +1,86 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.3 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Takenet.Textc", "Takenet.Textc\Takenet.Textc.csproj", "{875DF2A3-F0CD-4245-820B-CA0CAF0565A6}" +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Takenet.Textc", "Takenet.Textc\Takenet.Textc.csproj", "{51980A45-2C3F-489F-9247-1ACE30F2C857}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Takenet.Textc.UnitTests", "Takenet.Textc.UnitTests\Takenet.Textc.UnitTests.csproj", "{A06A6AF3-B92B-4B2F-B5A6-C68C62CA6E88}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Takenet.Textc.Extensions.Redis", "Takenet.Textc.Extensions.Redis\Takenet.Textc.Extensions.Redis.csproj", "{CBEB762A-93FE-4190-B25C-69C3D2482109}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Takenet.Textc.Samples", "Takenet.Textc.Samples\Takenet.Textc.Samples.csproj", "{CCE0D32D-1ADB-4AF7-8159-5F08BDBDF8B3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Takenet.Textc.Samples", "Takenet.Textc.Samples\Takenet.Textc.Samples.csproj", "{6089D671-4844-4B44-A2BC-5E1B4D9B58F6}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{90752505-39EF-40AF-8D3B-164BC848B2E9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Takenet.Textc.UnitTests", "Takenet.Textc.UnitTests\Takenet.Textc.UnitTests.csproj", "{F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{34A38F4F-24BC-4469-9237-9FC3025441FC}" ProjectSection(SolutionItems) = preProject ..\appveyor.yml = ..\appveyor.yml ..\LICENSE = ..\LICENSE ..\README.md = ..\README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Takenet.Textc.Extensions.Redis", "Takenet.Textc.Extensions.Redis\Takenet.Textc.Extensions.Redis.csproj", "{6F398506-FC95-45E1-B9AD-1E4A205C33FA}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {875DF2A3-F0CD-4245-820B-CA0CAF0565A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {875DF2A3-F0CD-4245-820B-CA0CAF0565A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {875DF2A3-F0CD-4245-820B-CA0CAF0565A6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {875DF2A3-F0CD-4245-820B-CA0CAF0565A6}.Release|Any CPU.Build.0 = Release|Any CPU - {A06A6AF3-B92B-4B2F-B5A6-C68C62CA6E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A06A6AF3-B92B-4B2F-B5A6-C68C62CA6E88}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A06A6AF3-B92B-4B2F-B5A6-C68C62CA6E88}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A06A6AF3-B92B-4B2F-B5A6-C68C62CA6E88}.Release|Any CPU.Build.0 = Release|Any CPU - {CCE0D32D-1ADB-4AF7-8159-5F08BDBDF8B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CCE0D32D-1ADB-4AF7-8159-5F08BDBDF8B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CCE0D32D-1ADB-4AF7-8159-5F08BDBDF8B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCE0D32D-1ADB-4AF7-8159-5F08BDBDF8B3}.Release|Any CPU.Build.0 = Release|Any CPU - {6F398506-FC95-45E1-B9AD-1E4A205C33FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F398506-FC95-45E1-B9AD-1E4A205C33FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F398506-FC95-45E1-B9AD-1E4A205C33FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F398506-FC95-45E1-B9AD-1E4A205C33FA}.Release|Any CPU.Build.0 = Release|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Debug|x64.ActiveCfg = Debug|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Debug|x64.Build.0 = Debug|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Debug|x86.ActiveCfg = Debug|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Debug|x86.Build.0 = Debug|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Release|Any CPU.Build.0 = Release|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Release|x64.ActiveCfg = Release|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Release|x64.Build.0 = Release|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Release|x86.ActiveCfg = Release|Any CPU + {51980A45-2C3F-489F-9247-1ACE30F2C857}.Release|x86.Build.0 = Release|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Debug|x64.ActiveCfg = Debug|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Debug|x64.Build.0 = Debug|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Debug|x86.ActiveCfg = Debug|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Debug|x86.Build.0 = Debug|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Release|Any CPU.Build.0 = Release|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Release|x64.ActiveCfg = Release|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Release|x64.Build.0 = Release|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Release|x86.ActiveCfg = Release|Any CPU + {CBEB762A-93FE-4190-B25C-69C3D2482109}.Release|x86.Build.0 = Release|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Debug|x64.ActiveCfg = Debug|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Debug|x64.Build.0 = Debug|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Debug|x86.ActiveCfg = Debug|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Debug|x86.Build.0 = Debug|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Release|Any CPU.Build.0 = Release|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Release|x64.ActiveCfg = Release|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Release|x64.Build.0 = Release|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Release|x86.ActiveCfg = Release|Any CPU + {6089D671-4844-4B44-A2BC-5E1B4D9B58F6}.Release|x86.Build.0 = Release|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Debug|x64.ActiveCfg = Debug|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Debug|x64.Build.0 = Debug|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Debug|x86.ActiveCfg = Debug|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Debug|x86.Build.0 = Debug|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Release|Any CPU.Build.0 = Release|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Release|x64.ActiveCfg = Release|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Release|x64.Build.0 = Release|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Release|x86.ActiveCfg = Release|Any CPU + {F18BFEB5-2F18-4A0F-B5EE-46DC311B6915}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B3F49E30-A767-4E69-B3D8-53255BD35AD1} + EndGlobalSection EndGlobal diff --git a/src/Takenet.Textc/Csdl/CsdlParser.cs b/src/Takenet.Textc/Csdl/CsdlParser.cs index dcda849..8cdf2fc 100644 --- a/src/Takenet.Textc/Csdl/CsdlParser.cs +++ b/src/Takenet.Textc/Csdl/CsdlParser.cs @@ -18,10 +18,12 @@ public static class CsdlParser static CsdlParser() { - var loadedAssemblies = AppDomain - .CurrentDomain - .GetAssemblies() - .Where(a => a.GetCustomAttributes(typeof (TokenTypeLibraryAttribute), false).Any()); + + var loadedAssemblies = Assembly + .GetEntryAssembly() + .GetReferencedAssemblies() + .Select(Assembly.Load) + .Where(a => a.GetCustomAttributes(typeof (TokenTypeLibraryAttribute), false).Any()); foreach (var assembly in loadedAssemblies) { diff --git a/src/Takenet.Textc/Properties/AssemblyInfo.cs b/src/Takenet.Textc/Properties/AssemblyInfo.cs index 5262f53..e509b13 100644 --- a/src/Takenet.Textc/Properties/AssemblyInfo.cs +++ b/src/Takenet.Textc/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Takenet.Textc.Metadata; @@ -12,7 +12,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Takenet.Textc")] -[assembly: AssemblyCopyright("Copyright © 2015 Take.net")] +[assembly: AssemblyCopyright("Copyright © 2015 Take.net")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/src/Takenet.Textc/Takenet.Textc.csproj b/src/Takenet.Textc/Takenet.Textc.csproj index 2bb905f..2084a0e 100644 --- a/src/Takenet.Textc/Takenet.Textc.csproj +++ b/src/Takenet.Textc/Takenet.Textc.csproj @@ -1,124 +1,13 @@ - - - + + - Debug - AnyCPU - {875DF2A3-F0CD-4245-820B-CA0CAF0565A6} - Library - Properties - Takenet.Textc - Takenet.Textc - v4.5.1 - 512 + netstandard2.0;net451 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Takenet.Textc.xml - - - - ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - - \ No newline at end of file + + diff --git a/src/Takenet.Textc/packages.config b/src/Takenet.Textc/packages.config deleted file mode 100644 index db67311..0000000 --- a/src/Takenet.Textc/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file