-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
The type initializer for 'Moq.Async.AwaitableFactory' threw an exception: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1 #1179
Comments
There have been many similar issues re: assembly versioning / binding redirects, they usually turn out to be a project configuration problem unrelated to Moq. I suggest you do a search for some possible solutions. I'm going to close this as off-topic; other than staying up-to-date with NuGet dependencies, there's not much we can do. |
@stakx: I reviewed GitHub issues and StackOverflow threads for the Moq and other projects, but haven't found working solution. One thing that is exceptional in case of that exception is that error is happening on the Azure DevOps context, not the local environment one. |
As per above, can you please re-open the issue, @stakx? |
No, this is more of an issue with NuGet's ridiculous versioning problems, it's not an issue caused by Moq. The only thing we can do is updating the versions of Moq's dependencies (such as the one on System.Threading.Tasks.Extensions), but even if we don't, you should still be able to resolve the issue by configuring your project differently. (For example, depending on the targeted frameworks, you can often force a specific version of a NuGet package by referencing it in your main project. There's also a few different ways to configure binding redirects for the .NET Framework.) But this isn't the right place to help you do that – this is the issue tracker for Moq. Finally, if the problem only surfaces with Azure DevOps, perhaps it would be better to ask in a place related to that? |
Sure thing, thank you for the info @stakx! I will continue trying to resolve that. |
Hi, |
Hi,
Recently, I started having errors when running tests on the Azure DevOps. The error I'm receiving is written below. Please note that me and none of my colleagues don't receive these errors locally.
Error:
Stack:
A few tech details:
packages.config
entry:Binding redirect in
app.config
:.csproj
entry:I had several trials, but none of these helped solving the issue.
I've found Moq 4.16.x for .NET Framework 4.5 uses reference to the System.Threading.Tasks.Extensions 4.2.0.1, not 4.5.4. Could it be an issue in my case?
Thanks
The text was updated successfully, but these errors were encountered: