Skip to content

Commit

Permalink
Adopt assembly versioning scheme 'major.minor.0.0'
Browse files Browse the repository at this point in the history
The rationale behind this is that we don't want changes in the patch
version to result in a different strong name; patches should be in-
place updates and shouldn't lead to version conflicts.

This will help reduce the need for assembly binding redirects.

For now, we only do 'major.minor.0.0' instead of 'major.0.0.0' (which
would be even better) and we increase the minor version by 1 to pre-
vent strange-looking binding redirects like these:

    4.0.0.0 - 4.7.127.0  ->  4.0.0.0
    4.0.0.0 - 4.7.127.0  ->  4.7.0.0

In both cases, the following will probably look less suspicious:

    4.0.0.0 - 4.7.127.0  ->  4.8.0.0

Moq 5 will be able to safely make the switch to 'major.0.0.0'.
  • Loading branch information
stakx committed Dec 8, 2017
1 parent 0ce473a commit 3389a8f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).


## Unreleased
## 4.8.0-rc1

This is a pre-release version.

#### Added

Expand All @@ -26,6 +28,7 @@ The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1

* **Breaking change:** `SetupSequence` now overrides pre-existing setups like all other `Setup` methods do. This means that exhausted sequences no longer fall back to previous setups to produce a "default" action or return value. (@stakx, #476)
* Delegates passed to `Returns` are validated a little more strictly than before (return type and parameter count must match with method being set up) (@stakx, #520)
* Change assembly versioning scheme to `major.minor.0.0` to help prevent assembly version conflicts and to reduce the need for binding redirects (@stakx, #424)

#### Fixed

Expand Down
2 changes: 1 addition & 1 deletion GitInfo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7.0
4.8.0-rc1
4 changes: 2 additions & 2 deletions Moq.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Moq</id>
<version>4.7</version>
<version>4.8.0-rc1</version>
<title>Moq: an enjoyable mocking library</title>
<authors>Daniel Cazzulino, kzu</authors>
<owners>Daniel Cazzulino, Clarius Labs, kzu</owners>
Expand All @@ -11,7 +11,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Moq is the most popular and friendly mocking framework for .NET</description>
<tags>moq tdd mocking mocks unittesting agile unittest</tags>
<releaseNotes>A changelog is available at https://github.com/moq/moq4/blob/master/CHANGELOG.md.</releaseNotes>
<releaseNotes>A changelog is available at https://github.com/moq/moq4/blob/v4.8.0-rc1/CHANGELOG.md.</releaseNotes>
<dependencies>
<group targetFramework=".NETFramework4.5">
<dependency id="Castle.Core" version="4.2.1" />
Expand Down
4 changes: 2 additions & 2 deletions Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
[assembly: AssemblyProduct("Moq")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion (ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)]
[assembly: AssemblyVersion (ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + ".0.0")]
[assembly: AssemblyFileVersion (ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)]
[assembly: AssemblyInformationalVersion (ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch + "-" + ThisAssembly.Git.Branch + "+" + ThisAssembly.Git.Commit)]
[assembly: AssemblyInformationalVersion (ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch + "-" + ThisAssembly.Git.SemVer.Label + "+" + ThisAssembly.Git.Commit)]

[assembly: ComVisible(false)]

Expand Down

0 comments on commit 3389a8f

Please sign in to comment.