From 4bb8f3ca7b6e9d94ac50bd5869df6b4ad50c6815 Mon Sep 17 00:00:00 2001 From: Wil Stead Date: Sun, 1 Jul 2018 15:02:30 -0400 Subject: [PATCH] Multi-target .NET Standard 2.0 and .NET Framework 4.5 --- .gitignore | 1 + Migrant.sln | 12 +- Migrant/AssemblyInfo.cs | 38 ----- Migrant/Generators/GeneratorHelper.cs | 9 ++ Migrant/Migrant.csproj | 133 +++--------------- MigrantWithTests.sln | 14 +- PerformanceTester/PerformanceTester.csproj | 67 ++------- PerformanceTester/Properties/AssemblyInfo.cs | 51 ------- PerformanceTester/packages.config | 5 - Tests/Tests.csproj | 66 +-------- Tests/packages.config | 5 - .../CompanionSecondModule.cs | 0 .../ISerializationDriverInterface.cs | 0 .../TestsSecondModule.csproj | 35 +---- 14 files changed, 70 insertions(+), 366 deletions(-) delete mode 100644 Migrant/AssemblyInfo.cs delete mode 100644 PerformanceTester/Properties/AssemblyInfo.cs delete mode 100644 PerformanceTester/packages.config delete mode 100644 Tests/packages.config rename {Tests/SecondModule => TestsSecondModule}/CompanionSecondModule.cs (100%) rename {Tests/SecondModule => TestsSecondModule}/ISerializationDriverInterface.cs (100%) rename {Tests/SecondModule => TestsSecondModule}/TestsSecondModule.csproj (61%) diff --git a/.gitignore b/.gitignore index 7489e8c..eb41589 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ obj #ide *.pidb *.userprefs +.vs #packages packages diff --git a/Migrant.sln b/Migrant.sln index a5eb227..b99ec6e 100644 --- a/Migrant.sln +++ b/Migrant.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2035 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Migrant", "Migrant\Migrant.csproj", "{5F87C357-09FB-4F53-BE37-41FE5BD88957}" EndProject Global @@ -17,6 +19,12 @@ Global {5F87C357-09FB-4F53-BE37-41FE5BD88957}.Release|Any CPU.ActiveCfg = Release|Any CPU {5F87C357-09FB-4F53-BE37-41FE5BD88957}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E35BCC8E-D806-47B1-AEC9-BE2FA761EB92} + EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.DotNetNamingPolicy = $1 diff --git a/Migrant/AssemblyInfo.cs b/Migrant/AssemblyInfo.cs deleted file mode 100644 index d4ce150..0000000 --- a/Migrant/AssemblyInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (c) 2012 - 2016 Ant Micro - - Authors: - * Konrad Kruczynski (kkruczynski@antmicro.com) - * Piotr Zierhoffer (pzierhoffer@antmicro.com) - * Mateusz Holenko (mholenko@antmicro.com) - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("Migrant")] -[assembly: AssemblyDescription("Fast and flexible serialization framework usable on undecorated classes.")] -[assembly: AssemblyCompany("Antmicro")] -[assembly: AssemblyCopyright("Copyright by Antmicro 2012 - 2016")] - -[assembly: AssemblyVersion("0.14")] - -[assembly: InternalsVisibleTo("Tests")] diff --git a/Migrant/Generators/GeneratorHelper.cs b/Migrant/Generators/GeneratorHelper.cs index 82284ad..dbc1571 100644 --- a/Migrant/Generators/GeneratorHelper.cs +++ b/Migrant/Generators/GeneratorHelper.cs @@ -304,6 +304,7 @@ public static void Debug_PrintValueFromStack(this ILGenerator generator, stri }); } +#if NET45 [Conditional("DEBUG")] public static void DumpToLibrary(GenerationContextBase context, Action generateCodeAction, string postfix = null) { @@ -341,6 +342,14 @@ public static void DumpToLibrary(GenerationContextBase context, Action(GenerationContextBase context, Action generateCodeAction, string postfix = null) + { + throw new NotImplementedException(); + } +#endif } } diff --git a/Migrant/Migrant.csproj b/Migrant/Migrant.csproj index 0ee2b1e..560f2a0 100644 --- a/Migrant/Migrant.csproj +++ b/Migrant/Migrant.csproj @@ -1,132 +1,43 @@ - - + - Debug - AnyCPU 8.0.30703 2.0 - {5F87C357-09FB-4F53-BE37-41FE5BD88957} - Library Antmicro.Migrant Migrant - v4.5 - - - True - full - False - bin\Debug - DEBUG; - prompt - 4 - False + netstandard2.0;net45 + Fast and flexible serialization framework usable on undecorated classes. + Copyright by Antmicro 2012 - 2016 + Antmicro + 0.14 - none - True - bin\Release - prompt - 4 - False bin\Release\Migrant.xml - false bin\DebugFormat - 4 true DEBUG_FORMAT; DEBUG - - - - + + <_Parameter1>Tests + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - + + NETSTANDARD2_0 + + + + + NET45 + diff --git a/MigrantWithTests.sln b/MigrantWithTests.sln index 3dfe65c..96300cc 100644 --- a/MigrantWithTests.sln +++ b/MigrantWithTests.sln @@ -1,11 +1,13 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2035 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Migrant", "Migrant\Migrant.csproj", "{5F87C357-09FB-4F53-BE37-41FE5BD88957}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{6109E322-4AC0-496C-89A2-012232A047E3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestsSecondModule", "Tests\SecondModule\TestsSecondModule.csproj", "{560B93C1-E336-47DA-A879-4E9C5B75A927}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestsSecondModule", "TestsSecondModule\TestsSecondModule.csproj", "{560B93C1-E336-47DA-A879-4E9C5B75A927}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PerformanceTester", "PerformanceTester\PerformanceTester.csproj", "{72492444-329C-42B1-B1E7-7A9B3BCA0953}" EndProject @@ -41,6 +43,12 @@ Global {72492444-329C-42B1-B1E7-7A9B3BCA0953}.Release|Any CPU.ActiveCfg = Release|Any CPU {72492444-329C-42B1-B1E7-7A9B3BCA0953}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {90FE339D-D30D-4C48-9124-23DE8B705572} + EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.StandardHeader = $1 diff --git a/PerformanceTester/PerformanceTester.csproj b/PerformanceTester/PerformanceTester.csproj index 575e15d..aa2a530 100644 --- a/PerformanceTester/PerformanceTester.csproj +++ b/PerformanceTester/PerformanceTester.csproj @@ -1,74 +1,23 @@ - - + - Debug - AnyCPU 8.0.30703 2.0 - {72492444-329C-42B1-B1E7-7A9B3BCA0953} Exe Antmicro.Migrant.PerformanceTester PerformanceTester - v4.5 - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - true - - - full - true - bin\Release - prompt - 4 - true + houen + 1.0.* + net45 + False - - - ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll - - - - ..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll - - - - - - - - - - - - - - - - - - - - - - - - + + - - {5F87C357-09FB-4F53-BE37-41FE5BD88957} - Migrant - + \ No newline at end of file diff --git a/PerformanceTester/Properties/AssemblyInfo.cs b/PerformanceTester/Properties/AssemblyInfo.cs deleted file mode 100644 index ef86d83..0000000 --- a/PerformanceTester/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,51 +0,0 @@ -// ******************************************************************* -// -// Copyright (c) 2012-2013, Antmicro Ltd -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ******************************************************************* -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("PerformanceTester")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("houen")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/PerformanceTester/packages.config b/PerformanceTester/packages.config deleted file mode 100644 index 83efd70..0000000 --- a/PerformanceTester/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 1f599af..4d2535d 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,74 +1,25 @@ - - + - Debug - AnyCPU 8.0.30703 2.0 - {6109E322-4AC0-496C-89A2-012232A047E3} - Library Antmicro.Migrant.Tests Tests - v4.5 + net45 - True - full - False - bin\Debug - DEBUG; - prompt - 4 - True true - none - True - bin\Release - prompt - 4 - True true - - - - ..\packages\NUnit.3.6.1\lib\net40\nunit.framework.dll - - - + + + - - - - - - - - - - - - - - - - - - - - - - {5F87C357-09FB-4F53-BE37-41FE5BD88957} - Migrant - - - {560B93C1-E336-47DA-A879-4E9C5B75A927} - TestsSecondModule - + + @@ -83,7 +34,4 @@ - - - diff --git a/Tests/packages.config b/Tests/packages.config deleted file mode 100644 index 564ddb2..0000000 --- a/Tests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Tests/SecondModule/CompanionSecondModule.cs b/TestsSecondModule/CompanionSecondModule.cs similarity index 100% rename from Tests/SecondModule/CompanionSecondModule.cs rename to TestsSecondModule/CompanionSecondModule.cs diff --git a/Tests/SecondModule/ISerializationDriverInterface.cs b/TestsSecondModule/ISerializationDriverInterface.cs similarity index 100% rename from Tests/SecondModule/ISerializationDriverInterface.cs rename to TestsSecondModule/ISerializationDriverInterface.cs diff --git a/Tests/SecondModule/TestsSecondModule.csproj b/TestsSecondModule/TestsSecondModule.csproj similarity index 61% rename from Tests/SecondModule/TestsSecondModule.csproj rename to TestsSecondModule/TestsSecondModule.csproj index 2b9aa2c..57358ec 100644 --- a/Tests/SecondModule/TestsSecondModule.csproj +++ b/TestsSecondModule/TestsSecondModule.csproj @@ -1,42 +1,11 @@ - - + - Debug - AnyCPU - {560B93C1-E336-47DA-A879-4E9C5B75A927} - Library TestsSecondModule TestsSecondModule 8.0.30703 2.0 - v4.5 + net45 - - True - full - False - bin\Debug - DEBUG; - prompt - 4 - False - - - none - True - bin\Release - prompt - 4 - False - - - - - - - - -