-
-
Notifications
You must be signed in to change notification settings - Fork 812
bug(assembly-loading): creating a moq of an interface in a third-party assembly can sometimes throw a FileNotFoundException #299
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
Comments
I can't get your
using Microsoft.Build.Framework;
using Moq;
class Program
{
static void Main()
{
Mock.Of<IBuildEngine>();
Mock.Of<IBuildEngine4>();
}
} Could you please update your repro code to current versions of .NET Core, Microsoft.Build.Framework, and Moq, and see if the error persists? |
Having a look at this again. I believe the error you encountered might be due to the way how According to the package page on NuGet.org, this package does target .NET Standard 1.3 (since the page lists dependencies for that target). If you download and extract the package, you will see the following contents:
Note the absence of a Contrast this with
So in conclusion, I would say that this is not an error with Moq, but with the way how that Microsoft NuGet package was made available. |
I created a simple reproduction in a repo: https://github.com/dmccaffery/moq-repro
execute reproduce.sh or reproduce.ps1 to use an isolated copy of dotnet core 1.1, or simply do:
in each project under the test folder. One will work, one will not. The only difference between the two is a different version of the same dependency. The one that fails is actually the current production version of the dependency.
The text was updated successfully, but these errors were encountered: