From 5c1903bc1fd1357fe1b95cc38428eafafb67c6cc Mon Sep 17 00:00:00 2001 From: Alexander Zeier Date: Sat, 25 Apr 2020 10:51:17 -0700 Subject: [PATCH] Migrate to .NET Standard/Core Closes #8 Partially based on #9 Co-authored-by: strican --- .github/workflows/main.yml | 26 ++- HearthDb.CardIdGenerator/App.config | 46 ----- .../HearthDb.CardIdGenerator.csproj | 180 +++--------------- HearthDb.CardIdGenerator/Program.cs | 5 +- .../Properties/AssemblyInfo.cs | 25 --- HearthDb.CardIdGenerator/packages.config | 38 ---- HearthDb.EnumsGenerator/App.config | 46 ----- .../HearthDb.EnumsGenerator.csproj | 152 +++------------ HearthDb.EnumsGenerator/Program.cs | 5 +- .../Properties/AssemblyInfo.cs | 25 --- HearthDb.EnumsGenerator/packages.config | 38 ---- HearthDb.Tests/HearthDb.Tests.csproj | 116 ++--------- HearthDb.Tests/Properties/AssemblyInfo.cs | 36 ---- HearthDb.Tests/UnitTest1.cs | 6 +- HearthDb.sln | 47 ++--- HearthDb/HearthDb.csproj | 149 +++++---------- HearthDb/Properties/AssemblyInfo.cs | 27 +-- HearthDb/verify.ps1 | 22 --- 18 files changed, 148 insertions(+), 841 deletions(-) delete mode 100644 HearthDb.CardIdGenerator/App.config delete mode 100644 HearthDb.CardIdGenerator/packages.config delete mode 100644 HearthDb.EnumsGenerator/App.config delete mode 100644 HearthDb.EnumsGenerator/packages.config delete mode 100644 HearthDb.Tests/Properties/AssemblyInfo.cs delete mode 100644 HearthDb/verify.ps1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aacd8d50..b40a1092 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,34 +8,30 @@ on: jobs: build: - runs-on: windows-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.0 - - - name: Setup VSTest - uses: darenm/Setup-VSTest@v1 - - - name: Setup NuGet - uses: NuGet/setup-nuget@v1.0.2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 - - name: Restore packages - run: nuget restore ./HearthDb.sln + - name: Install dependencies + run: dotnet restore - name: Build - run: msbuild ./HearthDb.sln /p:Configuration=Release + run: dotnet build --configuration Release --no-restore - - name: Run Tests - run: vstest.console "./HearthDb.Tests/bin/Release/HearthDb.Tests.dll" + - name: Test + run: dotnet test --no-restore --verbosity normal - name: Upload artifact if: github.event_name == 'push' uses: actions/upload-artifact@v1.0.0 with: name: HearthDb.dll - path: "./HearthDb/bin/Release/HearthDb.dll" + path: "./HearthDb/bin/Release/netstandard2.0/HearthDb.dll" deploy: needs: build diff --git a/HearthDb.CardIdGenerator/App.config b/HearthDb.CardIdGenerator/App.config deleted file mode 100644 index c060d721..00000000 --- a/HearthDb.CardIdGenerator/App.config +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HearthDb.CardIdGenerator/HearthDb.CardIdGenerator.csproj b/HearthDb.CardIdGenerator/HearthDb.CardIdGenerator.csproj index 9bbf5b59..ba4310c5 100644 --- a/HearthDb.CardIdGenerator/HearthDb.CardIdGenerator.csproj +++ b/HearthDb.CardIdGenerator/HearthDb.CardIdGenerator.csproj @@ -1,165 +1,31 @@ - - - + - Debug - AnyCPU - {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C} Exe - Properties - HearthDb.CardIdGenerator - HearthDb.CardIdGenerator - v4.6 - 512 - true - + netcoreapp3.1 + Copyright © HearthSim - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - true - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - true - - - - ..\packages\Microsoft.Build.15.6.85\lib\net46\Microsoft.Build.dll - True - - - ..\packages\Microsoft.Build.Framework.15.6.85\lib\net46\Microsoft.Build.Framework.dll - True - - - ..\packages\Microsoft.Build.Tasks.Core.15.6.85\lib\net46\Microsoft.Build.Tasks.Core.dll - True - - - ..\packages\Microsoft.Build.Utilities.Core.15.6.85\lib\net46\Microsoft.Build.Utilities.Core.dll - True - - - ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll - - - ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll - - - - ..\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - - - - ..\packages\System.Composition.AttributedModel.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - - - ..\packages\System.Composition.Convention.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll - - - ..\packages\System.Composition.Hosting.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll - - - ..\packages\System.Composition.Runtime.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll - - - ..\packages\System.Composition.TypedParts.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll - - - - ..\packages\System.Diagnostics.Process.4.1.0\lib\net46\System.Diagnostics.Process.dll - True - - - ..\packages\System.Reflection.Metadata.1.5.0\lib\portable-net45+win8\System.Reflection.Metadata.dll - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - - - ..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll - - - - - - - - - - - - - - - - - - - + - - {7ed14243-e02b-4b94-af00-a67a62c282f0} - HearthDb - + + - - + + + + + + + + + + + + + + + + + - - \ No newline at end of file diff --git a/HearthDb.CardIdGenerator/Program.cs b/HearthDb.CardIdGenerator/Program.cs index fe9d77e3..cd443beb 100644 --- a/HearthDb.CardIdGenerator/Program.cs +++ b/HearthDb.CardIdGenerator/Program.cs @@ -4,7 +4,6 @@ using System.IO; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Formatting; -using Microsoft.CodeAnalysis.MSBuild; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Microsoft.CodeAnalysis.CSharp.SyntaxKind; @@ -14,7 +13,7 @@ namespace HearthDb.CardIdGenerator { internal class Program { - private const string File = "../../../HearthDb/CardIds.cs"; + private const string File = "../../../../HearthDb/CardIds.cs"; static void Main() { @@ -34,7 +33,7 @@ static void Main() @namespace = @namespace.AddMembers(cCardIds); Console.WriteLine("Formatting namespace. This may take a while..."); - var root = Formatter.Format(@namespace, MSBuildWorkspace.Create()); + var root = Formatter.Format(@namespace, new AdhocWorkspace()); var rootString = root.ToString(); string prevString; diff --git a/HearthDb.CardIdGenerator/Properties/AssemblyInfo.cs b/HearthDb.CardIdGenerator/Properties/AssemblyInfo.cs index 8e66be94..b499cd42 100644 --- a/HearthDb.CardIdGenerator/Properties/AssemblyInfo.cs +++ b/HearthDb.CardIdGenerator/Properties/AssemblyInfo.cs @@ -2,18 +2,6 @@ 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("HearthDb.CardIdGenerator")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HearthDb.CardIdGenerator")] -[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. @@ -21,16 +9,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("89d6853a-faef-4e66-b5c5-95ffe71e9c8c")] - -// 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/HearthDb.CardIdGenerator/packages.config b/HearthDb.CardIdGenerator/packages.config deleted file mode 100644 index fe752841..00000000 --- a/HearthDb.CardIdGenerator/packages.config +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/HearthDb.EnumsGenerator/App.config b/HearthDb.EnumsGenerator/App.config deleted file mode 100644 index c060d721..00000000 --- a/HearthDb.EnumsGenerator/App.config +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HearthDb.EnumsGenerator/HearthDb.EnumsGenerator.csproj b/HearthDb.EnumsGenerator/HearthDb.EnumsGenerator.csproj index ec9e991b..2e8629db 100644 --- a/HearthDb.EnumsGenerator/HearthDb.EnumsGenerator.csproj +++ b/HearthDb.EnumsGenerator/HearthDb.EnumsGenerator.csproj @@ -1,135 +1,29 @@ - - - + + - Debug - AnyCPU - {D6D59655-923E-4745-BF2E-9E59CB0F10D7} Exe - Properties - HearthDb.EnumsGenerator - HearthDb.EnumsGenerator - v4.6 - 512 - true + netcoreapp3.1 + Copyright © HearthSim - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\Microsoft.Build.15.6.85\lib\net46\Microsoft.Build.dll - True - - - ..\packages\Microsoft.Build.Framework.15.6.85\lib\net46\Microsoft.Build.Framework.dll - True - - - ..\packages\Microsoft.Build.Tasks.Core.15.6.85\lib\net46\Microsoft.Build.Tasks.Core.dll - True - - - ..\packages\Microsoft.Build.Utilities.Core.15.6.85\lib\net46\Microsoft.Build.Utilities.Core.dll - True - - - ..\packages\Microsoft.CodeAnalysis.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.CSharp.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.VisualBasic.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.dll - - - ..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.1.0.0\lib\net45\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.dll - - - ..\packages\Microsoft.CodeAnalysis.Workspaces.Common.1.0.0\lib\net45\Microsoft.CodeAnalysis.Workspaces.Desktop.dll - - - - ..\packages\System.Collections.Immutable.1.4.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - - - - ..\packages\System.Composition.AttributedModel.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - - - ..\packages\System.Composition.Convention.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll - - - ..\packages\System.Composition.Hosting.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll - - - ..\packages\System.Composition.Runtime.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll - - - ..\packages\System.Composition.TypedParts.1.1.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll - - - - ..\packages\System.Diagnostics.Process.4.1.0\lib\net46\System.Diagnostics.Process.dll - True - - - ..\packages\System.Reflection.Metadata.1.5.0\lib\portable-net45+win8\System.Reflection.Metadata.dll - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - - - ..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll - - - - - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + - - + \ No newline at end of file diff --git a/HearthDb.EnumsGenerator/Program.cs b/HearthDb.EnumsGenerator/Program.cs index 5d9d834d..faec211e 100644 --- a/HearthDb.EnumsGenerator/Program.cs +++ b/HearthDb.EnumsGenerator/Program.cs @@ -4,14 +4,13 @@ using System.IO; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Formatting; -using Microsoft.CodeAnalysis.MSBuild; using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; namespace HearthDb.EnumsGenerator { internal class Program { - private const string File = "../../../HearthDb/Enums/Enums.cs"; + private const string File = "../../../../HearthDb/Enums/Enums.cs"; static void Main() { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; @@ -28,7 +27,7 @@ static void Main() var @namespace = NamespaceDeclaration(IdentifierName("HearthDb.Enums")).AddMembers(new [] {first}.Concat(members.Skip(1)).ToArray()); Console.WriteLine($"Formatting namespace..."); - var root = Formatter.Format(@namespace, MSBuildWorkspace.Create()); + var root = Formatter.Format(@namespace, new AdhocWorkspace()); var rootString = root.ToString(); string prevString; diff --git a/HearthDb.EnumsGenerator/Properties/AssemblyInfo.cs b/HearthDb.EnumsGenerator/Properties/AssemblyInfo.cs index 29218169..0927845f 100644 --- a/HearthDb.EnumsGenerator/Properties/AssemblyInfo.cs +++ b/HearthDb.EnumsGenerator/Properties/AssemblyInfo.cs @@ -2,18 +2,6 @@ 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("HearthDb.EnumsGenerator")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HearthDb.EnumsGenerator")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[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. @@ -21,16 +9,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("d6d59655-923e-4745-bf2e-9e59cb0f10d7")] - -// 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/HearthDb.EnumsGenerator/packages.config b/HearthDb.EnumsGenerator/packages.config deleted file mode 100644 index fe752841..00000000 --- a/HearthDb.EnumsGenerator/packages.config +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/HearthDb.Tests/HearthDb.Tests.csproj b/HearthDb.Tests/HearthDb.Tests.csproj index f4687bdc..9ea1105b 100644 --- a/HearthDb.Tests/HearthDb.Tests.csproj +++ b/HearthDb.Tests/HearthDb.Tests.csproj @@ -1,108 +1,20 @@ - - + + - Debug - AnyCPU - {CB4162D6-E64D-4D3A-9207-9C850B684183} - Library - Properties - HearthDb.Tests - HearthDb.Tests - v4.5.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest + netcoreapp3.1 + + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - - - - + - - - + + + + + - - {7ed14243-e02b-4b94-af00-a67a62c282f0} - HearthDb - + - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file + + diff --git a/HearthDb.Tests/Properties/AssemblyInfo.cs b/HearthDb.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index b13d4e4a..00000000 --- a/HearthDb.Tests/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("HearthDb.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HearthDb.Tests")] -[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("cb4162d6-e64d-4d3a-9207-9c850b684183")] - -// 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/HearthDb.Tests/UnitTest1.cs b/HearthDb.Tests/UnitTest1.cs index 2aa5f77a..edfc1107 100644 --- a/HearthDb.Tests/UnitTest1.cs +++ b/HearthDb.Tests/UnitTest1.cs @@ -1,11 +1,7 @@ -#region - using HearthDb.Enums; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Linq; -#endregion - namespace HearthDb.Tests { [TestClass] @@ -76,4 +72,4 @@ public void TextCardText() Assert.IsTrue(galakrond.Text.Contains("It costs (0).")); } } -} \ No newline at end of file +} diff --git a/HearthDb.sln b/HearthDb.sln index 3b743cb8..5773565f 100644 --- a/HearthDb.sln +++ b/HearthDb.sln @@ -1,15 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30011.22 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HearthDb", "HearthDb\HearthDb.csproj", "{7ED14243-E02B-4B94-AF00-A67A62C282F0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HearthDb", "HearthDb\HearthDb.csproj", "{7ED14243-E02B-4B94-AF00-A67A62C282F0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HearthDb.Tests", "HearthDb.Tests\HearthDb.Tests.csproj", "{CB4162D6-E64D-4D3A-9207-9C850B684183}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HearthDb.CardIdGenerator", "HearthDb.CardIdGenerator\HearthDb.CardIdGenerator.csproj", "{89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HearthDb.CardIdGenerator", "HearthDb.CardIdGenerator\HearthDb.CardIdGenerator.csproj", "{89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HearthDb.EnumsGenerator", "HearthDb.EnumsGenerator\HearthDb.EnumsGenerator.csproj", "{D6D59655-923E-4745-BF2E-9E59CB0F10D7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HearthDb.EnumsGenerator", "HearthDb.EnumsGenerator\HearthDb.EnumsGenerator.csproj", "{D6D59655-923E-4745-BF2E-9E59CB0F10D7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HearthDb.Tests", "HearthDb.Tests\HearthDb.Tests.csproj", "{875316D1-C4C3-48BD-BDAE-3727269B2A67}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,28 +21,20 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Debug|x86.ActiveCfg = Debug|x86 - {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Debug|x86.Build.0 = Debug|x86 + {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Debug|x86.Build.0 = Debug|Any CPU {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Release|Any CPU.ActiveCfg = Release|Any CPU {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Release|Any CPU.Build.0 = Release|Any CPU - {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Release|x86.ActiveCfg = Release|x86 - {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Release|x86.Build.0 = Release|x86 - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Debug|x86.ActiveCfg = Debug|x86 - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Debug|x86.Build.0 = Debug|x86 - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Release|Any CPU.Build.0 = Release|Any CPU - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Release|x86.ActiveCfg = Release|x86 - {CB4162D6-E64D-4D3A-9207-9C850B684183}.Release|x86.Build.0 = Release|x86 + {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Release|x86.ActiveCfg = Release|Any CPU + {7ED14243-E02B-4B94-AF00-A67A62C282F0}.Release|x86.Build.0 = Release|Any CPU {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Debug|x86.ActiveCfg = Debug|x86 - {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Debug|x86.Build.0 = Debug|x86 + {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Debug|x86.ActiveCfg = Debug|Any CPU + {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Debug|x86.Build.0 = Debug|Any CPU {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Release|Any CPU.ActiveCfg = Release|Any CPU {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Release|Any CPU.Build.0 = Release|Any CPU - {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Release|x86.ActiveCfg = Release|x86 - {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Release|x86.Build.0 = Release|x86 + {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Release|x86.ActiveCfg = Release|Any CPU + {89D6853A-FAEF-4E66-B5C5-95FFE71E9C8C}.Release|x86.Build.0 = Release|Any CPU {D6D59655-923E-4745-BF2E-9E59CB0F10D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D6D59655-923E-4745-BF2E-9E59CB0F10D7}.Debug|Any CPU.Build.0 = Debug|Any CPU {D6D59655-923E-4745-BF2E-9E59CB0F10D7}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -51,8 +43,19 @@ Global {D6D59655-923E-4745-BF2E-9E59CB0F10D7}.Release|Any CPU.Build.0 = Release|Any CPU {D6D59655-923E-4745-BF2E-9E59CB0F10D7}.Release|x86.ActiveCfg = Release|Any CPU {D6D59655-923E-4745-BF2E-9E59CB0F10D7}.Release|x86.Build.0 = Release|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Debug|Any CPU.Build.0 = Debug|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Debug|x86.ActiveCfg = Debug|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Debug|x86.Build.0 = Debug|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Release|Any CPU.ActiveCfg = Release|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Release|Any CPU.Build.0 = Release|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Release|x86.ActiveCfg = Release|Any CPU + {875316D1-C4C3-48BD-BDAE-3727269B2A67}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ECAFEB37-3EE3-49D9-B804-964A7106DA6D} + EndGlobalSection EndGlobal diff --git a/HearthDb/HearthDb.csproj b/HearthDb/HearthDb.csproj index 96f5e450..2e50f585 100644 --- a/HearthDb/HearthDb.csproj +++ b/HearthDb/HearthDb.csproj @@ -1,106 +1,49 @@ - - - + + - Debug - AnyCPU - {7ED14243-E02B-4B94-AF00-A67A62C282F0} - Library - Properties - HearthDb - HearthDb - v4.5 - 512 - + netstandard2.0 + HearthDb + HearthSim + HearthDb + Copyright © HearthSim 2020 + 17.0.2.45932 + 17.0.2.45932 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if exist $(ProjectDir)hsdata ( - git -C "$(ProjectDir)hsdata" fetch - git -C "$(ProjectDir)hsdata" reset --hard origin/master -) else ( - git clone --depth=1 https://github.com/HearthSim/hsdata.git "$(ProjectDir)hsdata" -) -if "$(ConfigurationName)" == "Release" ( - powershell -ExecutionPolicy Unrestricted -file "$(ProjectDir)verify.ps1" "$(ProjectDir)\" -) -xcopy /Y "$(ProjectDir)hsdata\CardDefs.xml" "$(ProjectDir)CardDefs.xml*" - - + + + + + + + + + $(RootNamespace).CardDefs.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HearthDb/Properties/AssemblyInfo.cs b/HearthDb/Properties/AssemblyInfo.cs index d33a85a8..e9a2c0f2 100644 --- a/HearthDb/Properties/AssemblyInfo.cs +++ b/HearthDb/Properties/AssemblyInfo.cs @@ -1,19 +1,7 @@ -using System.Reflection; +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("HearthDb")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("HearthSim")] -[assembly: AssemblyProduct("HearthDb")] -[assembly: AssemblyCopyright("Copyright © HearthSim 2020")] -[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. @@ -21,16 +9,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7ed14243-e02b-4b94-af00-a67a62c282f0")] - -// 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("17.0.2.45932")] -[assembly: AssemblyFileVersion("17.0.2.45932")] diff --git a/HearthDb/verify.ps1 b/HearthDb/verify.ps1 deleted file mode 100644 index 1974b75c..00000000 --- a/HearthDb/verify.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -$assemblyVersion = Get-Content ($args[0] + "Properties\AssemblyInfo.cs") | - where { $_ -match '\[assembly: AssemblyVersion\("([\d\.]+)"\)\]' } | - foreach { $matches[1] } - -$hsdataVersion = git -C ($args[0] + "hsdata") log -1 | - where { $_ -match "Update to patch ([\d\.]+)$" } | - foreach { $matches[1] } - -if ($assemblyVersion -ne $hsdataVersion) { - $versionRegex = [regex]"^(.+)\.\d+$" - $aVersion = $versionRegex.Match($assemblyVersion).Groups[1].Value - $hsdVersion = $versionRegex.Match($hsdataVersion).Groups[1].Value - if ($aVersion -ne $hsdVersion) { - echo "verify.ps1: verification error 1: assembly version ($assemblyVersion) does not match hsdata ($hsdataVersion)" - } - else { - echo "verify.ps1: verification warning 1: assembly version ($assemblyVersion) does not match hsdata ($hsdataVersion)" - } -} -else { - echo "verify.ps1: version up-to-date: ($assemblyVersion)" -}