Machine.Specifications (MSpec) 0.4

Some time ago, I handed off maintenance of MSpec to Alexander Groß. He has continued to add features, fix bugs, tweak and fine tune various aspects of MSpec. I’m forever grateful for his efforts.

Over the past few days, he pushed several changes, some breaking, so I wanted to call them out here. Below his his note on the machine user group.

Hi all,

I’ve pushed some changes to MSpec over the last couple of days and wanted to let you know what changed:

- Runners for x86/AnyCPU, .NET 3.5 and 4.0 in one zip
Runners for all these architectures/CLRs are now in one package.
mspec.exe -> AnyCPU, CLR 2.0
mspec-clr4.exe -> AnyCPU, CLR 4.0
mspec-x86.exe -> x86, CLR 2.0
mspec-x86c-clr4.exe -> x86, CLR 4.0

This is possibly a breaking change as mspec.exe was x86 traditionally. Most unit testing frameworks (xUnit, NUnit) follow the same convention.

- Machine.Specifications.dll is not strong-named by default
We had to strong name our framework assembly to support some very specific scenarios.
https://github.com/machine/machine.specifications/issues#issue/34/comment/761201

We removed the strong name for our default build because SNs cause more problems than they solve. You can always build with signing turned on by running the build as follows:
build.cmd SIGN_ASSEMBLY=true

Builds started from inside Visual Studio will not be signed by default. There are two build configurations on our TeamCity server, one for the unsigned and one for the signed configuration:
http://teamcity.codebetter.com/project.html?projectId=project27

There’s an extra NuGet package for the signed build, see below.

- Assembly versioning
From now on releases will be versioned correctly. (We re-released 0.3.0.0 over the last couple of months.) The version number is generated by TeamCity. Builds on your local machine will compile as 0.4.0.0. You can override this:
build.cmd VERSION=0.4.3.2

For such a build, the zip and NuGet packages will have a “Testing” suffix, such that you can easily test these: Install-Package Machine.Specifications-Testing

build.cmd VERSION=0.4.3.2 SIGN_ASSEMBLY=true creates a signed Machine.Specifications.dll with version number 0.4.3.2.

- A better NuGet package
I updated the NuGet package for MSpec. That is, we have two packages: Machine.Specifications and Machine.Specifications-Signed. You correctly guessed what’s different :) The package contains the framework DLL (inside /lib) as well as the runners (in /tools).

The TestDriven.Net

- Versioning and the ReSharper runner
You will very likely encounter problems if you update Machine.Specifications (0.4.x) in your project but not the ReSharper runner (still 0.3.0.0, strong-named). The result is gray icons next to the specification nodes in the Unit Test Session window.

The problem can be solved easily by updating the ReSharper runner. The updated ReSharper runners now contains some logic to check if the runner is compatible the project and will display an error message if not.

Please let me know if you encounter any problems with the new builds!

Alex

You can check out the readme on the github project for more info and download links. Enjoy!

This entry was posted in machine, mspec. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://lucisferre.net Chris Nicola

    The documentation in Readme could really use an update. It’s missing tons of information. I keep finding myself scrambling to Google search for simple things like how to do a teardown when I can’t remember it.

  • Vivian092821

    http://www.jordansfitting.com

    nike air max
    air jordans
    air jordan 1
    air jordan 5
    air jordan 6
    air jordan 11
    air jordan 13
    nike air jordan
    air jordan shoes
    air jordans 2011
    sale air jordan
    air retro jordan
    cheap jordan shoes
    jordan air shoes

    http://www.jordansfitting.com

  • Pingback: The Morning Brew - Chris Alcock » The Morning Brew #810