dnu restore says JSON.NET could not be found #1934
Comments
I do not use JSON.NET in this project at all. |
What version of dnx are you using? cc @troydai |
|
@BrennanConroy hit this issue today, too. It seems to be only repo on |
Hmm |
@troydai Shouldn't it come transitively though? |
Just want to let people know that this is under investigation. @BrennanConroy investigated this and found the commit e9b8144 is the root cause. @davidfowl and @BrennanConroy will do some further investigation |
Ok I debugged it and figured it out. It's a behavior difference on mono with how assembly resolve works: This is the minimal repro: using System;
using System.Reflection;
public class Program
{
public static void Main()
{
AppDomain.CurrentDomain.AssemblyResolve += (sender, e) =>
{
Console.WriteLine($"AssemblyResolve({e.Name})");
Assembly.Load(new AssemblyName(e.Name));
return null;
};
var an = new AssemblyName("Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed");
var assembly = Assembly.Load(an);
Console.WriteLine("Hello World");
}
} On windows .NET this stack overflows, on mono it just fails on the second call to load. It looks like the call is cached before a result is returned from the handler. This used to work because we only passed in the short name: Assembly.Load(PackageManager) Notice the rename from |
When i restore packages i get this stack trace:
The text was updated successfully, but these errors were encountered: