From b7c247435873875ea624d2b896e870dbf969b93f Mon Sep 17 00:00:00 2001 From: Alex Zaytsev Date: Sat, 19 Sep 2020 12:55:12 +1200 Subject: [PATCH 1/3] Restore old key --- src/FluentKey.snk | Bin 0 -> 596 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/FluentKey.snk diff --git a/src/FluentKey.snk b/src/FluentKey.snk new file mode 100644 index 0000000000000000000000000000000000000000..2ab6c53614ad73b0b1372fb1ef21e0785ea59bf9 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097-p-FN2j#{x$!oYtp3q6g1i$b(IQ1xDK zE*P);bTRwQhOBL|LlZyKg*Nc>+{&mrCZUG;J%-onW zv@w^t=)1OD4!hg$Z`VuwD~sR_;uyMkK@9TsmoiP%t}6j{jvgVJbpR|a2yK0{9yb0Y z4jxVY4!TQXYP8q+G)uSIb~H8Ao;m z)$|#xr<6vji*g=h4jrL?ze^ni8r(ozr|znHuki-*kZlIp9i|xa2fyI6An)iJQITsm zaS5%95l`Tu2Ik@mW^Oa#mZN0!{tZ$z3=Rj9)Z511m8x#TE!`Rx@_GC5+XhxtxHMGR zUXNnN3(0J&5|J91f>wMa>6&r+C2Svb1&u?(JNRaH{uRQ~NA;u<3UyW+oO)Kpx zntLv=rA*dgJ6py}%Ml6$o_7?ToXyTn2aS>0O^sZzgH)x{u>?eVQZO8T9ula40qSp( z|AE>B5V5dEha`Q;c`9Ntsx!Ir`KfADa;7hCtYb*fxU5AUFHK7ln%H5}-EEgauyAoW i(7|70U+`JteDE=eVROJcd*4-D#ba;e1y^h>6_<*uNEmql literal 0 HcmV?d00001 From f743fcafc6aac3421a48f5cb3456a7f35918c1df Mon Sep 17 00:00:00 2001 From: Alex Zaytsev Date: Sat, 19 Sep 2020 13:25:03 +1200 Subject: [PATCH 2/3] Build Strong Named Assembly --- .../FluentNHibernate.Testing.csproj | 3 --- .../Visitors/RelationshipPairingVisitorSpec.cs | 4 ++-- src/FluentNHibernate/FluentNHibernate.csproj | 7 ++----- src/FluentNHibernate/Properties/AssemblyInfo.cs | 4 +--- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj b/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj index 366b49d35..f92b18f39 100644 --- a/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj +++ b/src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj @@ -34,9 +34,6 @@ - - FluentKey.snk - diff --git a/src/FluentNHibernate.Testing/Visitors/RelationshipPairingVisitorSpec.cs b/src/FluentNHibernate.Testing/Visitors/RelationshipPairingVisitorSpec.cs index 7067859f1..1777439ff 100644 --- a/src/FluentNHibernate.Testing/Visitors/RelationshipPairingVisitorSpec.cs +++ b/src/FluentNHibernate.Testing/Visitors/RelationshipPairingVisitorSpec.cs @@ -21,13 +21,13 @@ public override void establish_context() manyToOneARankedFirstToHolder.Set(x => x.Class, Layer.Defaults, new TypeReference(typeof(Holder))); manyToOneARankedFirstToHolder.Set(x => x.Name, Layer.Defaults, "ARankedFirstProperty"); manyToOneARankedFirstToHolder.ContainingEntityType = typeof(ARankedFirst); - manyToOneARankedFirstToHolder.Member = new PropertyMember(typeof(ARankedFirst).GetProperty("ARankedFirstProperty")); + manyToOneARankedFirstToHolder.Member = typeof(ARankedFirst).GetProperty("ARankedFirstProperty").ToMember(); manyToOneBRankedSecondToHolder = new ManyToOneMapping(); manyToOneBRankedSecondToHolder.Set(x => x.Class, Layer.Defaults, new TypeReference(typeof(Holder))); manyToOneBRankedSecondToHolder.Set(x => x.Name, Layer.Defaults, "BRankedSecondProperty"); manyToOneBRankedSecondToHolder.ContainingEntityType = typeof(BRankedSecond); - manyToOneBRankedSecondToHolder.Member = new PropertyMember(typeof(BRankedSecond).GetProperty("BRankedSecondProperty")); + manyToOneBRankedSecondToHolder.Member = typeof(BRankedSecond).GetProperty("BRankedSecondProperty").ToMember(); var relationship = new OneToManyMapping(); relationship.Set(x => x.Class, Layer.Defaults, new TypeReference(typeof(BRankedSecond))); diff --git a/src/FluentNHibernate/FluentNHibernate.csproj b/src/FluentNHibernate/FluentNHibernate.csproj index 587b3ca9b..089b069c4 100644 --- a/src/FluentNHibernate/FluentNHibernate.csproj +++ b/src/FluentNHibernate/FluentNHibernate.csproj @@ -7,13 +7,10 @@ Library true true + true + ../FluentKey.snk - - FluentNHibernate - - - AllRules.ruleset diff --git a/src/FluentNHibernate/Properties/AssemblyInfo.cs b/src/FluentNHibernate/Properties/AssemblyInfo.cs index ecb1db70f..a0f494ee0 100644 --- a/src/FluentNHibernate/Properties/AssemblyInfo.cs +++ b/src/FluentNHibernate/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: ComVisible(false)] -[assembly: CLSCompliant(true)] -[assembly: InternalsVisibleTo("FluentNHibernate.Testing")] \ No newline at end of file +[assembly: CLSCompliant(true)] \ No newline at end of file From 115960213c9bc3cc68cbc22ec68e6ae2b60a2ab7 Mon Sep 17 00:00:00 2001 From: Alex Zaytsev Date: Sat, 19 Sep 2020 20:55:49 +1200 Subject: [PATCH 3/3] Make assembly version major.minor --- GitVersion.yml | 1 + build.cake | 5 ++++- build/version.cake | 12 +++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index 2e7de7b77..b711b4ac1 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,3 +1,4 @@ +assembly-versioning-scheme: MajorMinor branches: master: mode: ContinuousDelivery diff --git a/build.cake b/build.cake index 2e0772a7a..3e7167a41 100644 --- a/build.cake +++ b/build.cake @@ -21,6 +21,8 @@ Setup((context) => Information("FluentNHibernate"); Information($"SemVersion: {parameters.Version.SemVersion}"); + Information($"AssemblyVersion: {parameters.Version.AssemblyVersion}"); + Information($"Version: {parameters.Version.Version}"); Information($"IsLocalBuild: {parameters.IsLocalBuild}"); Information($"IsTagged: {parameters.IsTagged}"); Information($"IsPullRequest: {parameters.IsPullRequest}"); @@ -31,8 +33,9 @@ Setup((context) => msBuildSettings = new DotNetCoreMSBuildSettings() .WithProperty("Version", parameters.Version.SemVersion) - .WithProperty("AssemblyVersion", parameters.Version.Version) + .WithProperty("AssemblyVersion", parameters.Version.AssemblyVersion) .WithProperty("FileVersion", parameters.Version.Version) + .WithProperty("InformationalVersion", parameters.Version.InformationalVersion) .WithProperty("PackageReleaseNotes", string.Concat("\"", releaseNotes, "\"")); }); diff --git a/build/version.cake b/build/version.cake index 1c945cc81..7db4d3be7 100644 --- a/build/version.cake +++ b/build/version.cake @@ -5,6 +5,8 @@ public class BuildVersion public string DotNetAsterix { get; private set; } public string Milestone { get; private set; } public string AppVersion { get; private set; } + public string AssemblyVersion { get; private set; } + public string InformationalVersion {get; private set; } public static BuildVersion Calculate(ICakeContext context, BuildParameters parameters) { @@ -15,6 +17,8 @@ public class BuildVersion string version = null; string semVersion = null; + string assemblyVersion = null; + string informationalVersion = null; string milestone = null; if (context.IsRunningOnWindows()) @@ -29,6 +33,8 @@ public class BuildVersion version = context.EnvironmentVariable("GitVersion_MajorMinorPatch"); semVersion = context.EnvironmentVariable("GitVersion_LegacySemVerPadded"); + assemblyVersion = context.EnvironmentVariable("GitVersion_AssemblySemVer"); + informationalVersion = context.EnvironmentVariable("GitVersion_InformationalVersion"); milestone = string.Concat("v", version); } @@ -39,6 +45,8 @@ public class BuildVersion version = assertedVersions.MajorMinorPatch; semVersion = assertedVersions.LegacySemVerPadded; + assemblyVersion = assertedVersions.AssemblySemVer; + informationalVersion = assertedVersions.InformationalVersion; milestone = string.Concat("v", version); context.Information("Calculated Semantic Version: {0}", semVersion); @@ -52,7 +60,9 @@ public class BuildVersion SemVersion = semVersion, DotNetAsterix = semVersion.Substring(version.Length).TrimStart('-'), Milestone = milestone, - AppVersion = appVersion + AppVersion = appVersion, + AssemblyVersion = assemblyVersion, + InformationalVersion = informationalVersion, }; } } \ No newline at end of file