-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem of AutoFixture current version with Moq current version #260
Comments
Ya I know.. on my local computer build it works... but on deployment it doesnt! |
Are you using the same test runner on your local computer and the build server, or is it two different test runners? |
I use the same. I use visual studio 2012 on my local computer and TFS 2012 on server. we configure automated build and deployment on test server. and when I trigger build it show me the following error. Test method NeoplexERP.Service.Business.UnitTests.Core.LookupBusinessService_GetAllTest.Should_GetAll_Gender threw exception: |
I don't know how TFS works, but from the exception message, it's quite clear that it can't find Moq, so either it's not picking up the assembly redirect, or the file is not available on the server. If you can provide a way to reproduce the issue (without asking us to install TFS), we can take a look, but otherwise, this sounds like a TFS issue rather than an AutoFixture issue. |
No no... it is not related to TFS issue! there is Moq.dll on build folder but it is version 4.0... in my local computer the same I have only version 4.0... but it show me this error message when it is on build server! why is that...? |
How TFS invokes MSBuild? What are the arguments supplied to the MSBuild.exe process? |
we give arguments on build definition! and MSBuild.exe will be called with those configuration |
Can you post the full build log somewhere? (Not here, just give us the URL). |
There's not a lot of detail to go with here. It may be true that the issue isn't related to TFS, but if that's the case, you should be able to tell us how to reproduce the issue. Right now, based on my experience, the error message you're seeing is always caused by a problem with assembly redirects. Either the assembly redirect is incorrect, or the test runner isn't picking it up. Keep in mind that having an app.config file associated with a library (.dll) isn't picked up the .NET run-time by default, so it's something every test runner explicitly does. |
@ploeh I agree with your approach... due to the TFS build copy only one version of Moq (4....) unable to redirect to the exact version. my point is I remove version Moq(3.6...) on my local computer and I run the test project it work fine... why no it does not work on other machine? "Ploeh.AutoFixture.AutoMoq.MockPostprocessor.Create" does not request version 3.6... why it use version 4? |
@bcopmt143 Were you able to resolve your issue? |
Closing due to inactivity. |
Hi Team, |
@Skm5900 It might be that you are relying on the implicit version of |
when i build my application using Team Foundation MsBuild I face this problem. it work on my local computer I face this problem when it is on server.
System.IO.FileLoadException: Could not load file or assembly 'Moq, Version=3.1.416.3, 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)
at Ploeh.AutoFixture.AutoMoq.MockPostprocessor.Create(Object request, ISpecimenContext context)
The text was updated successfully, but these errors were encountered: