Category Archives: MSpec

Error loading .NET 4.0 assembly in TeamCity using MSpec

When we migrated our tests from NUnit to MSpec (Machine.Specifications), we encountered the following error: Could not load file or assembly ‘file:///C:\BuildAgent\work\c7e220bd4bfc29dc\bin\dependencies\SomeProject.dll’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. After some Googling, I realized that the default MSpec runner (MSpec.exe) […]

Also posted in .NET, Continuous Integration, TeamCity | Tagged , , , | Leave a comment