Skip to content

Commit f2067c9

Browse files
committed
RuleSetToolkit should restore..
1 parent 2aa7dc6 commit f2067c9

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: dotnet restore
6161

6262
- name: Build
63-
run: dotnet build --configuration Release --no-restore
63+
run: dotnet build --configuration Release
6464

6565
- name: Test
6666
run: dotnet test --no-restore --verbosity normal --filter "UnitTests.NetFramework.NetFrameworkRulesTests|UnitTests.NetCore.NetCoreRulesTests"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: dotnet restore
4949

5050
- name: Build
51-
run: dotnet build --configuration Release --no-restore
51+
run: dotnet build --configuration Release
5252

5353
- name: Test
5454
run: dotnet test --no-restore --verbosity normal --filter "UnitTests.NetFramework.NetFrameworkRulesTests|UnitTests.NetCore.NetCoreRulesTests"

Console.SampleFlow.NetCore.DefineAndSerialize/Console.SampleFlow.NetCore.DefineAndSerialize.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<TargetFramework>net5.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

Console.SampleFlow.NetCore.DefineAndSerialize/Program.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Microsoft.Extensions.Configuration;
44
using System.CodeDom;
55
using System.IO;
6+
using System.Text.RegularExpressions;
67

78
namespace Console.SampleFlow.NetCore.DefineAndSerialize
89
{
@@ -688,7 +689,26 @@ private static string SerializeRules(object drs)
688689
stringWriter.Flush();
689690
}
690691

691-
return ruleDefinition.ToString();
692+
return UpdateStrongNames(ruleDefinition.ToString());
692693
}
694+
695+
private static string UpdateStrongNames(string ruleSetXml)
696+
{
697+
if (ruleSetXml == null) return null;
698+
699+
ruleSetXml = Regex.Replace(ruleSetXml, AssemblyStrongNames.NETCORE_MATCH, AssemblyStrongNames.NETCORE);
700+
ruleSetXml = Regex.Replace(ruleSetXml, AssemblyStrongNames.CODEDOM_NETCORE_MATCH, AssemblyStrongNames.CODEDOM_NETCORE);
701+
702+
return ruleSetXml;
703+
}
704+
}
705+
706+
internal struct AssemblyStrongNames
707+
{
708+
internal const string NETCORE = "System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e";
709+
internal const string CODEDOM_NETCORE = "System.CodeDom, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51";
710+
711+
internal const string NETCORE_MATCH = @"System.Private.CoreLib, Version=\d.\d.\d.\d, Culture=neutral, PublicKeyToken=7cec85d7bea7798e";
712+
internal const string CODEDOM_NETCORE_MATCH = @"System.CodeDom, Version=\d.\d.\d.\d, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51";
693713
}
694714
}

LogicBuilder.Rules.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Global
125125
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Debug|x86.ActiveCfg = Debug|Any CPU
126126
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Debug|x86.Build.0 = Debug|Any CPU
127127
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Release|Any CPU.ActiveCfg = Release|Any CPU
128-
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Release|Any CPU.Build.0 = Release|Any CPU
129128
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Release|ARM.ActiveCfg = Release|Any CPU
130129
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Release|ARM.Build.0 = Release|Any CPU
131130
{2E9B053D-EBDB-406D-9BB5-E935192BD48F}.Release|ARM64.ActiveCfg = Release|Any CPU

0 commit comments

Comments
 (0)