zcz527 / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Moq support not working with Moq 4.1.1309.1617 #458

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps that reproduce the problem?

1. Install latest Moq NuGet package (v 4.1.1309.1617)
2. Install Autofac NuGet package (v.3.1.1)
2. Install latest "Autofac Extras: Moq Mocking Support" package (3.0.0)
3. Create an XUnit test, e.g.:

[Fact]
public void X()
{
  var autoMock = AutoMock.GetLoose();
  var amazonQuantityBatchPublisher = autoMock.Create<ClassToTest>();
}

What is the expected output? What do you see instead?

Expect test to run successfully. Instead we see this error:

System.IO.FileLoadException
Could not load file or assembly 'Moq, Version=4.0.10827.0, Culture=neutral, 
PublicKeyToken=69f491c39445e920' or one of its dependencies. The located 
assembly's manifest definition does not match the assembly reference. 
(Exception from HRESULT: 0x80131040)

What version of Autofac are you using? On what version of .NET/Silverlight?

Autofac 3.1.1 running on .NET 4.5 in VS2013 RC.

Original issue reported on code.google.com by joshua.p...@googlemail.com on 20 Sep 2013 at 7:38

GoogleCodeExporter commented 8 years ago
Fixed with Autofac.Extras.Moq 3.0.1. 

Package has been updated to Moq 4.1.1309.1617 and is available on NuGet.

http://www.nuget.org/packages/Autofac.Extras.Moq

Original comment by alex.meyergleaves on 23 Sep 2013 at 12:21

GoogleCodeExporter commented 8 years ago
This issue was closed by revision a4bb9d6700c4.

Original comment by alex.meyergleaves on 23 Sep 2013 at 12:24

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Autofac.Extras.Moq 3.0.1 has a dependency on Autofac 3.1.3, which as far as I 
can tell does not yet exist. Am I missing something?

Original comment by remember...@gmail.com on 14 Oct 2013 at 7:02

GoogleCodeExporter commented 8 years ago
Nope. It was a mistake made while getting the MyGet feed up and running. I have 
pushed 3.1.3 to NuGet now so it should be fixed.

Original comment by alex.meyergleaves on 16 Oct 2013 at 2:23