Skip to content
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

Can't resolve some assemblies when targeting .NET Core 'Class Library' projects #7

Closed
jcansdale opened this issue Jul 12, 2016 · 20 comments
Milestone

Comments

@jcansdale
Copy link
Owner

jcansdale commented Jul 12, 2016

This works fine for some assemblies. For example, you can reference the NUnit package and 'Run Test(s)' on the following:

void test()
{
    Console.WriteLine(typeof(NUnit.Framework.TestActionAttribute));
}

However, if you reference 'System.Diagnostics.TraceSource' and try this:

void trace()
{
    Console.WriteLine(typeof(System.Diagnostics.Trace));
}

...you get the following error:

------ Test started: Assembly: ClassLibrary1.dll ------

Test 'M:ClassLibrary1.Class1.hello' failed: Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    File name: 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    at ClassLibrary1.Class1.hello()

0 passed, 1 failed, 0 skipped, took 0.57 seconds (.NET Core).

My 'ClassLibrary1.dll.deps.json' file looks like this (expand to view).

{
  "runtimeTarget": {
    "name": ".NETCoreApp,Version=v1.0/",
    "signature": "4234ee95ae22e85288c71e3f4ee2d14a4f78af56"
  },
  "compilationOptions": {},
  "targets": {
    ".NETCoreApp,Version=v1.0": {},
    ".NETCoreApp,Version=v1.0/": {
      "ClassLibrary1/1.0.0": {
        "dependencies": {
          "NETStandard.Library": "1.6.0",
          "NUnit": "3.4.1",
          "System.Diagnostics.TraceSource": "4.0.0",
          "Utilities": "1.0.0"
        },
        "runtime": {
          "ClassLibrary1.dll": {}
        }
      },
      "Microsoft.NETCore.Platforms/1.0.1": {},
      "Microsoft.NETCore.Targets/1.0.1": {},
      "Microsoft.Win32.Primitives/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "NETStandard.Library/1.6.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.Win32.Primitives": "4.0.1",
          "System.AppContext": "4.1.0",
          "System.Collections": "4.0.11",
          "System.Collections.Concurrent": "4.0.12",
          "System.Console": "4.0.0",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Diagnostics.Tools": "4.0.1",
          "System.Diagnostics.Tracing": "4.1.0",
          "System.Globalization": "4.0.11",
          "System.Globalization.Calendars": "4.0.1",
          "System.IO": "4.1.0",
          "System.IO.Compression": "4.1.0",
          "System.IO.Compression.ZipFile": "4.0.1",
          "System.IO.FileSystem": "4.0.1",
          "System.IO.FileSystem.Primitives": "4.0.1",
          "System.Linq": "4.1.0",
          "System.Linq.Expressions": "4.1.0",
          "System.Net.Http": "4.1.0",
          "System.Net.Primitives": "4.0.11",
          "System.Net.Sockets": "4.1.0",
          "System.ObjectModel": "4.0.12",
          "System.Reflection": "4.1.0",
          "System.Reflection.Extensions": "4.0.1",
          "System.Reflection.Primitives": "4.0.1",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
          "System.Runtime.Numerics": "4.0.1",
          "System.Security.Cryptography.Algorithms": "4.2.0",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Security.Cryptography.X509Certificates": "4.1.0",
          "System.Text.Encoding": "4.0.11",
          "System.Text.Encoding.Extensions": "4.0.11",
          "System.Text.RegularExpressions": "4.1.0",
          "System.Threading": "4.0.11",
          "System.Threading.Tasks": "4.0.11",
          "System.Threading.Timer": "4.0.1",
          "System.Xml.ReaderWriter": "4.0.11",
          "System.Xml.XDocument": "4.0.11"
        }
      },
      "NUnit/3.4.1": {
        "runtime": {
          "lib/dotnet/nunit.framework.dll": {}
        }
      },
      "runtime.native.System/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1"
        }
      },
      "runtime.native.System.IO.Compression/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1"
        }
      },
      "runtime.native.System.Net.Http/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1"
        }
      },
      "runtime.native.System.Security.Cryptography/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1"
        }
      },
      "System.AppContext/4.1.0": {
        "dependencies": {
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.6/System.AppContext.dll": {}
        }
      },
      "System.Buffers/4.0.0": {
        "dependencies": {
          "System.Diagnostics.Debug": "4.0.11",
          "System.Diagnostics.Tracing": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Threading": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.1/System.Buffers.dll": {}
        }
      },
      "System.Collections/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Collections.Concurrent/4.0.12": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Diagnostics.Tracing": "4.1.0",
          "System.Globalization": "4.0.11",
          "System.Reflection": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Threading": "4.0.11",
          "System.Threading.Tasks": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.Collections.Concurrent.dll": {}
        }
      },
      "System.Console/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.IO": "4.1.0",
          "System.Runtime": "4.1.0",
          "System.Text.Encoding": "4.0.11"
        }
      },
      "System.Diagnostics.Debug/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Diagnostics.DiagnosticSource/4.0.0": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Tracing": "4.1.0",
          "System.Reflection": "4.1.0",
          "System.Runtime": "4.1.0",
          "System.Threading": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {}
        }
      },
      "System.Diagnostics.Tools/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Diagnostics.TraceSource/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Globalization": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Threading": "4.0.11",
          "runtime.native.System": "4.0.0"
        }
      },
      "System.Diagnostics.Tracing/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Globalization/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Globalization.Calendars/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Globalization": "4.0.11",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Globalization.Extensions/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Globalization": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.InteropServices": "4.1.0"
        }
      },
      "System.IO/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0",
          "System.Text.Encoding": "4.0.11",
          "System.Threading.Tasks": "4.0.11"
        }
      },
      "System.IO.Compression/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.IO": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Text.Encoding": "4.0.11",
          "System.Threading": "4.0.11",
          "System.Threading.Tasks": "4.0.11",
          "runtime.native.System": "4.0.0",
          "runtime.native.System.IO.Compression": "4.1.0"
        }
      },
      "System.IO.Compression.ZipFile/4.0.1": {
        "dependencies": {
          "System.Buffers": "4.0.0",
          "System.IO": "4.1.0",
          "System.IO.Compression": "4.1.0",
          "System.IO.FileSystem": "4.0.1",
          "System.IO.FileSystem.Primitives": "4.0.1",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Text.Encoding": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.IO.Compression.ZipFile.dll": {}
        }
      },
      "System.IO.FileSystem/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.IO": "4.1.0",
          "System.IO.FileSystem.Primitives": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Text.Encoding": "4.0.11",
          "System.Threading.Tasks": "4.0.11"
        }
      },
      "System.IO.FileSystem.Primitives/4.0.1": {
        "dependencies": {
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll": {}
        }
      },
      "System.Linq/4.1.0": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.6/System.Linq.dll": {}
        }
      },
      "System.Linq.Expressions/4.1.0": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Globalization": "4.0.11",
          "System.IO": "4.1.0",
          "System.Linq": "4.1.0",
          "System.ObjectModel": "4.0.12",
          "System.Reflection": "4.1.0",
          "System.Reflection.Emit": "4.0.1",
          "System.Reflection.Emit.ILGeneration": "4.0.1",
          "System.Reflection.Emit.Lightweight": "4.0.1",
          "System.Reflection.Extensions": "4.0.1",
          "System.Reflection.Primitives": "4.0.1",
          "System.Reflection.TypeExtensions": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Threading": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.6/System.Linq.Expressions.dll": {}
        }
      },
      "System.Net.Http/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Diagnostics.DiagnosticSource": "4.0.0",
          "System.Diagnostics.Tracing": "4.1.0",
          "System.Globalization": "4.0.11",
          "System.Globalization.Extensions": "4.0.1",
          "System.IO": "4.1.0",
          "System.IO.FileSystem": "4.0.1",
          "System.Net.Primitives": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Security.Cryptography.Algorithms": "4.2.0",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.OpenSsl": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Security.Cryptography.X509Certificates": "4.1.0",
          "System.Text.Encoding": "4.0.11",
          "System.Threading": "4.0.11",
          "System.Threading.Tasks": "4.0.11",
          "runtime.native.System": "4.0.0",
          "runtime.native.System.Net.Http": "4.0.1",
          "runtime.native.System.Security.Cryptography": "4.0.0"
        }
      },
      "System.Net.Primitives/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Handles": "4.0.1"
        }
      },
      "System.Net.Sockets/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.IO": "4.1.0",
          "System.Net.Primitives": "4.0.11",
          "System.Runtime": "4.1.0",
          "System.Threading.Tasks": "4.0.11"
        }
      },
      "System.ObjectModel/4.0.12": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Threading": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.ObjectModel.dll": {}
        }
      },
      "System.Reflection/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.IO": "4.1.0",
          "System.Reflection.Primitives": "4.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Reflection.Emit/4.0.1": {
        "dependencies": {
          "System.IO": "4.1.0",
          "System.Reflection": "4.1.0",
          "System.Reflection.Emit.ILGeneration": "4.0.1",
          "System.Reflection.Primitives": "4.0.1",
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.3/System.Reflection.Emit.dll": {}
        }
      },
      "System.Reflection.Emit.ILGeneration/4.0.1": {
        "dependencies": {
          "System.Reflection": "4.1.0",
          "System.Reflection.Primitives": "4.0.1",
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll": {}
        }
      },
      "System.Reflection.Emit.Lightweight/4.0.1": {
        "dependencies": {
          "System.Reflection": "4.1.0",
          "System.Reflection.Emit.ILGeneration": "4.0.1",
          "System.Reflection.Primitives": "4.0.1",
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll": {}
        }
      },
      "System.Reflection.Extensions/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Reflection": "4.1.0",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Reflection.Primitives/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Reflection.TypeExtensions/4.1.0": {
        "dependencies": {
          "System.Reflection": "4.1.0",
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.5/System.Reflection.TypeExtensions.dll": {}
        }
      },
      "System.Resources.ResourceManager/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Globalization": "4.0.11",
          "System.Reflection": "4.1.0",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Runtime/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1"
        }
      },
      "System.Runtime.Extensions/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Runtime.Handles/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Runtime.InteropServices/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Reflection": "4.1.0",
          "System.Reflection.Primitives": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Handles": "4.0.1"
        }
      },
      "System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Reflection": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Threading": "4.0.11",
          "runtime.native.System": "4.0.0"
        }
      },
      "System.Runtime.Loader/4.0.0": {
        "dependencies": {
          "System.IO": "4.1.0",
          "System.Reflection": "4.1.0",
          "System.Runtime": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.5/System.Runtime.Loader.dll": {}
        }
      },
      "System.Runtime.Numerics/4.0.1": {
        "dependencies": {
          "System.Globalization": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0"
        },
        "runtime": {
          "lib/netstandard1.3/System.Runtime.Numerics.dll": {}
        }
      },
      "System.Security.Cryptography.Algorithms/4.2.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Collections": "4.0.11",
          "System.IO": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Runtime.Numerics": "4.0.1",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Text.Encoding": "4.0.11",
          "runtime.native.System.Security.Cryptography": "4.0.0"
        }
      },
      "System.Security.Cryptography.Cng/4.2.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.IO": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Security.Cryptography.Algorithms": "4.2.0",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Text.Encoding": "4.0.11"
        }
      },
      "System.Security.Cryptography.Csp/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.IO": "4.1.0",
          "System.Reflection": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Security.Cryptography.Algorithms": "4.2.0",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Text.Encoding": "4.0.11",
          "System.Threading": "4.0.11"
        }
      },
      "System.Security.Cryptography.Encoding/4.0.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Collections": "4.0.11",
          "System.Collections.Concurrent": "4.0.12",
          "System.Linq": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Text.Encoding": "4.0.11",
          "runtime.native.System.Security.Cryptography": "4.0.0"
        }
      },
      "System.Security.Cryptography.OpenSsl/4.0.0": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.IO": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Runtime.Numerics": "4.0.1",
          "System.Security.Cryptography.Algorithms": "4.2.0",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Text.Encoding": "4.0.11",
          "runtime.native.System.Security.Cryptography": "4.0.0"
        },
        "runtime": {
          "lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll": {}
        }
      },
      "System.Security.Cryptography.Primitives/4.0.0": {
        "dependencies": {
          "System.Diagnostics.Debug": "4.0.11",
          "System.Globalization": "4.0.11",
          "System.IO": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Threading": "4.0.11",
          "System.Threading.Tasks": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll": {}
        }
      },
      "System.Security.Cryptography.X509Certificates/4.1.0": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Globalization": "4.0.11",
          "System.Globalization.Calendars": "4.0.1",
          "System.IO": "4.1.0",
          "System.IO.FileSystem": "4.0.1",
          "System.IO.FileSystem.Primitives": "4.0.1",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.Handles": "4.0.1",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Runtime.Numerics": "4.0.1",
          "System.Security.Cryptography.Algorithms": "4.2.0",
          "System.Security.Cryptography.Cng": "4.2.0",
          "System.Security.Cryptography.Csp": "4.0.0",
          "System.Security.Cryptography.Encoding": "4.0.0",
          "System.Security.Cryptography.OpenSsl": "4.0.0",
          "System.Security.Cryptography.Primitives": "4.0.0",
          "System.Text.Encoding": "4.0.11",
          "System.Threading": "4.0.11",
          "runtime.native.System": "4.0.0",
          "runtime.native.System.Net.Http": "4.0.1",
          "runtime.native.System.Security.Cryptography": "4.0.0"
        }
      },
      "System.Text.Encoding/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Text.Encoding.Extensions/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0",
          "System.Text.Encoding": "4.0.11"
        }
      },
      "System.Text.RegularExpressions/4.1.0": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Globalization": "4.0.11",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Threading": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.6/System.Text.RegularExpressions.dll": {}
        }
      },
      "System.Threading/4.0.11": {
        "dependencies": {
          "System.Runtime": "4.1.0",
          "System.Threading.Tasks": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.Threading.dll": {}
        }
      },
      "System.Threading.Tasks/4.0.11": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Threading.Tasks.Extensions/4.0.0": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Runtime": "4.1.0",
          "System.Threading.Tasks": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {}
        }
      },
      "System.Threading.Timer/4.0.1": {
        "dependencies": {
          "Microsoft.NETCore.Platforms": "1.0.1",
          "Microsoft.NETCore.Targets": "1.0.1",
          "System.Runtime": "4.1.0"
        }
      },
      "System.Xml.ReaderWriter/4.0.11": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Globalization": "4.0.11",
          "System.IO": "4.1.0",
          "System.IO.FileSystem": "4.0.1",
          "System.IO.FileSystem.Primitives": "4.0.1",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Runtime.InteropServices": "4.1.0",
          "System.Text.Encoding": "4.0.11",
          "System.Text.Encoding.Extensions": "4.0.11",
          "System.Text.RegularExpressions": "4.1.0",
          "System.Threading.Tasks": "4.0.11",
          "System.Threading.Tasks.Extensions": "4.0.0"
        },
        "runtime": {
          "lib/netstandard1.3/System.Xml.ReaderWriter.dll": {}
        }
      },
      "System.Xml.XDocument/4.0.11": {
        "dependencies": {
          "System.Collections": "4.0.11",
          "System.Diagnostics.Debug": "4.0.11",
          "System.Diagnostics.Tools": "4.0.1",
          "System.Globalization": "4.0.11",
          "System.IO": "4.1.0",
          "System.Reflection": "4.1.0",
          "System.Resources.ResourceManager": "4.0.1",
          "System.Runtime": "4.1.0",
          "System.Runtime.Extensions": "4.1.0",
          "System.Text.Encoding": "4.0.11",
          "System.Threading": "4.0.11",
          "System.Xml.ReaderWriter": "4.0.11"
        },
        "runtime": {
          "lib/netstandard1.3/System.Xml.XDocument.dll": {}
        }
      },
      "Utilities/1.0.0": {
        "dependencies": {
          "System.Diagnostics.TraceSource": "4.0.0",
          "NETStandard.Library": "1.6.0",
          "System.Runtime.Loader": "4.0.0"
        },
        "runtime": {
          "Utilities.dll": {}
        }
      }
    }
  },
  "libraries": {
    "ClassLibrary1/1.0.0": {
      "type": "project",
      "serviceable": false,
      "sha512": ""
    },
    "Microsoft.NETCore.Platforms/1.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-2G6OjjJzwBfNOO8myRV/nFrbTw5iA+DEm0N+qUqhrOmaVtn4pC77h38I1jsXGw5VH55+dPfQsqHD0We9sCl9FQ=="
    },
    "Microsoft.NETCore.Targets/1.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-rkn+fKobF/cbWfnnfBOQHKVKIOpxMZBvlSHkqDWgBpwGDcLRduvs3D9OLGeV6GWGvVwNlVi2CBbTjuPmtHvyNw=="
    },
    "Microsoft.Win32.Primitives/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-fQnBHO9DgcmkC9dYSJoBqo6sH1VJwJprUHh8F3hbcRlxiQiBUuTntdk8tUwV490OqC2kQUrinGwZyQHTieuXRA=="
    },
    "NETStandard.Library/1.6.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-ypsCvIdCZ4IoYASJHt6tF2fMo7N30NLgV1EbmC+snO490OMl9FvVxmumw14rhReWU3j3g7BYudG6YCrchwHJlA=="
    },
    "NUnit/3.4.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-G/9h/ENn8+GvT5DvBqVNrUhIWuxtAr0/oVGN2ljKVUw50EAZYBzeWSy9s6nqMswaQACpQzljql1sWQ/peE2eJg=="
    },
    "runtime.native.System/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-QfS/nQI7k/BLgmLrw7qm7YBoULEvgWnPI+cYsbfCVFTW8Aj+i8JhccxcFMu1RWms0YZzF+UHguNBK4Qn89e2Sg=="
    },
    "runtime.native.System.IO.Compression/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-Ob7nvnJBox1aaB222zSVZSkf4WrebPG4qFscfK7vmD7P7NxoSxACQLtO7ytWpqXDn2wcd/+45+EAZ7xjaPip8A=="
    },
    "runtime.native.System.Net.Http/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-Nh0UPZx2Vifh8r+J+H2jxifZUD3sBrmolgiFWJd2yiNrxO0xTa6bAw3YwRn1VOiSen/tUXMS31ttNItCZ6lKuA=="
    },
    "runtime.native.System.Security.Cryptography/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-2CQK0jmO6Eu7ZeMgD+LOFbNJSXHFVQbCJJkEyEwowh1SCgYnrn9W9RykMfpeeVGw7h4IBvYikzpGUlmZTUafJw=="
    },
    "System.AppContext/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-3QjO4jNV7PdKkmQAVp9atA+usVnKRwI3Kx1nMwJ93T0LcQfx7pKAYk0nKz5wn1oP5iqlhZuy6RXOFdhr7rDwow=="
    },
    "System.Buffers/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-msXumHfjjURSkvxUjYuq4N2ghHoRi2VpXcKMA7gK6ujQfU3vGpl+B6ld0ATRg+FZFpRyA6PgEPA+VlIkTeNf2w=="
    },
    "System.Collections/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg=="
    },
    "System.Collections.Concurrent/4.0.12": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-2gBcbb3drMLgxlI0fBfxMA31ec6AEyYCHygGse4vxceJan8mRIWeKJ24BFzN7+bi/NFTgdIgufzb94LWO5EERQ=="
    },
    "System.Console/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-qSKUSOIiYA/a0g5XXdxFcUFmv1hNICBD7QZ0QhGYVipPIhvpiydY8VZqr1thmCXvmn8aipMg64zuanB4eotK9A=="
    },
    "System.Diagnostics.Debug/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw=="
    },
    "System.Diagnostics.DiagnosticSource/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-YKglnq4BMTJxfcr6nuT08g+yJ0UxdePIHxosiLuljuHIUR6t4KhFsyaHOaOc1Ofqp0PUvJ0EmcgiEz6T7vEx3w=="
    },
    "System.Diagnostics.Tools/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-xBfJ8pnd4C17dWaC9FM6aShzbJcRNMChUMD42I6772KGGrqaFdumwhn9OdM68erj1ueNo3xdQ1EwiFjK5k8p0g=="
    },
    "System.Diagnostics.TraceSource/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-6WVCczFZKXwpWpzd/iJkYnsmWTSFFiU24Xx/YdHXBcu+nFI/ehTgeqdJQFbtRPzbrO3KtRNjvkhtj4t5/WwWsA=="
    },
    "System.Diagnostics.Tracing/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-vDN1PoMZCkkdNjvZLql592oYJZgS7URcJzJ7bxeBgGtx5UtR5leNm49VmfHGqIffX4FKacHbI3H6UyNSHQknBg=="
    },
    "System.Globalization/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-B95h0YLEL2oSnwF/XjqSWKnwKOy/01VWkNlsCeMTFJLLabflpGV26nK164eRs5GiaRSBGpOxQ3pKoSnnyZN5pg=="
    },
    "System.Globalization.Calendars/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-L1c6IqeQ88vuzC1P81JeHmHA8mxq8a18NUBNXnIY/BVb+TCyAaGIFbhpZt60h9FJNmisymoQkHEFSE9Vslja1Q=="
    },
    "System.Globalization.Extensions/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-KKo23iKeOaIg61SSXwjANN7QYDr/3op3OWGGzDzz7mypx0Za0fZSeG0l6cco8Ntp8YMYkIQcAqlk8yhm5/Uhcg=="
    },
    "System.IO/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ=="
    },
    "System.IO.Compression/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-TjnBS6eztThSzeSib+WyVbLzEdLKUcEHN69VtS3u8aAsSc18FU6xCZlNWWsEd8SKcXAE+y1sOu7VbU8sUeM0sg=="
    },
    "System.IO.Compression.ZipFile/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-hBQYJzfTbQURF10nLhd+az2NHxsU6MU7AB8RUf4IolBP5lOAm4Luho851xl+CqslmhI5ZH/el8BlngEk4lBkaQ=="
    },
    "System.IO.FileSystem/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-IBErlVq5jOggAD69bg1t0pJcHaDbJbWNUZTPI96fkYWzwYbN6D9wRHMULLDd9dHsl7C2YsxXL31LMfPI1SWt8w=="
    },
    "System.IO.FileSystem.Primitives/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ=="
    },
    "System.Linq/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g=="
    },
    "System.Linq.Expressions/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw=="
    },
    "System.Net.Http/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-ULq9g3SOPVuupt+Y3U+A37coXzdNisB1neFCSKzBwo182u0RDddKJF8I5+HfyXqK6OhJPgeoAwWXrbiUXuRDsg=="
    },
    "System.Net.Primitives/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-hVvfl4405DRjA2408luZekbPhplJK03j2Y2lSfMlny7GHXlkByw1iLnc9mgKW0GdQn73vvMcWrWewAhylXA4Nw=="
    },
    "System.Net.Sockets/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-xAz0N3dAV/aR/9g8r0Y5oEqU1JRsz29F5EGb/WVHmX3jVSLqi2/92M5hTad2aNWovruXrJpJtgZ9fccPMG9uSw=="
    },
    "System.ObjectModel/4.0.12": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ=="
    },
    "System.Reflection/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-JCKANJ0TI7kzoQzuwB/OoJANy1Lg338B6+JVacPl4TpUwi3cReg3nMLplMq2uqYfHFQpKIlHAUVAJlImZz/4ng=="
    },
    "System.Reflection.Emit/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g=="
    },
    "System.Reflection.Emit.ILGeneration/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA=="
    },
    "System.Reflection.Emit.Lightweight/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA=="
    },
    "System.Reflection.Extensions/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-GYrtRsZcMuHF3sbmRHfMYpvxZoIN2bQGrYGerUiWLEkqdEUQZhH3TRSaC/oI4wO0II1RKBPlpIa1TOMxIcOOzQ=="
    },
    "System.Reflection.Primitives/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-4inTox4wTBaDhB7V3mPvp9XlCbeGYWVEM9/fXALd52vNEAVisc1BoVWQPuUuD0Ga//dNbA/WeMy9u9mzLxGTHQ=="
    },
    "System.Reflection.TypeExtensions/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg=="
    },
    "System.Resources.ResourceManager/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA=="
    },
    "System.Runtime/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g=="
    },
    "System.Runtime.Extensions/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ=="
    },
    "System.Runtime.Handles/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g=="
    },
    "System.Runtime.InteropServices/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ=="
    },
    "System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-hWPhJxc453RCa8Z29O91EmfGeZIHX1ZH2A8L6lYQVSaKzku2DfArSfMEb1/MYYzPQRJZeu0c9dmYeJKxW5Fgng=="
    },
    "System.Runtime.Loader/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-4UN78GOVU/mbDFcXkEWtetJT/sJ0yic2gGk1HSlSpWI0TDf421xnrZTDZnwNBapk1GQeYN7U1lTj/aQB1by6ow=="
    },
    "System.Runtime.Numerics/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-+XbKFuzdmLP3d1o9pdHu2nxjNr2OEPqGzKeegPLCUMM71a0t50A/rOcIRmGs9wR7a8KuHX6hYs/7/TymIGLNqg=="
    },
    "System.Security.Cryptography.Algorithms/4.2.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-8JQFxbLVdrtIOKMDN38Fn0GWnqYZw/oMlwOUG/qz1jqChvyZlnUmu+0s7wLx7JYua/nAXoESpHA3iw11QFWhXg=="
    },
    "System.Security.Cryptography.Cng/4.2.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-cUJ2h+ZvONDe28Szw3st5dOHdjndhJzQ2WObDEXAWRPEQBtVItVoxbXM/OEsTthl3cNn2dk2k0I3y45igCQcLw=="
    },
    "System.Security.Cryptography.Csp/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-/i1Usuo4PgAqgbPNC0NjbO3jPW//BoBlTpcWFD1EHVbidH21y4c1ap5bbEMSGAXjAShhMH4abi/K8fILrnu4BQ=="
    },
    "System.Security.Cryptography.Encoding/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-FbKgE5MbxSQMPcSVRgwM6bXN3GtyAh04NkV8E5zKCBE26X0vYW0UtTa2FIgkH33WVqBVxRgxljlVYumWtU+HcQ=="
    },
    "System.Security.Cryptography.OpenSsl/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-HUG/zNUJwEiLkoURDixzkzZdB5yGA5pQhDP93ArOpDPQMteURIGERRNzzoJlmTreLBWr5lkFSjjMSk8ySEpQMw=="
    },
    "System.Security.Cryptography.Primitives/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-Wkd7QryWYjkQclX0bngpntW5HSlMzeJU24UaLJQ7YTfI8ydAVAaU2J+HXLLABOVJlKTVvAeL0Aj39VeTe7L+oA=="
    },
    "System.Security.Cryptography.X509Certificates/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-4HEfsQIKAhA1+ApNn729Gi09zh+lYWwyIuViihoMDWp1vQnEkL2ct7mAbhBlLYm+x/L4Rr/pyGge1lIY635e0w=="
    },
    "System.Text.Encoding/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-U3gGeMlDZXxCEiY4DwVLSacg+DFWCvoiX+JThA/rvw37Sqrku7sEFeVBBBMBnfB6FeZHsyDx85HlKL19x0HtZA=="
    },
    "System.Text.Encoding.Extensions/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-jtbiTDtvfLYgXn8PTfWI+SiBs51rrmO4AAckx4KR6vFK9Wzf6tI8kcRdsYQNwriUeQ1+CtQbM1W4cMbLXnj/OQ=="
    },
    "System.Text.RegularExpressions/4.1.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-i88YCXpRTjCnoSQZtdlHkAOx4KNNik4hMy83n0+Ftlb7jvV6ZiZWMpnEZHhjBp6hQVh8gWd/iKNPzlPF7iyA2g=="
    },
    "System.Threading/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ=="
    },
    "System.Threading.Tasks/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ=="
    },
    "System.Threading.Tasks.Extensions/4.0.0": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-pH4FZDsZQ/WmgJtN4LWYmRdJAEeVkyriSwrv2Teoe5FOU0Yxlb6II6GL8dBPOfRmutHGATduj3ooMt7dJ2+i+w=="
    },
    "System.Threading.Timer/4.0.1": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw=="
    },
    "System.Xml.ReaderWriter/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-ZIiLPsf67YZ9zgr31vzrFaYQqxRPX9cVHjtPSnmx4eN6lbS/yEyYNr2vs1doGDEscF0tjCZFsk9yUg1sC9e8tg=="
    },
    "System.Xml.XDocument/4.0.11": {
      "type": "package",
      "serviceable": true,
      "sha512": "sha512-Mk2mKmPi0nWaoiYeotq1dgeNK1fqWh61+EK+w4Wu8SWuTYLzpUnschb59bJtGywaPq7SmTuPf44wrXRwbIrukg=="
    },
    "Utilities/1.0.0": {
      "type": "project",
      "serviceable": false,
      "sha512": ""
    }
  }
}
AppContext.GetData("APP_CONTEXT_DEPS_FILES") ==
"C:\Source\GitHub\NetCoreTests\ClassLibrary1\bin\Debug\netcoreapp1.0\ClassLibrary1.deps.json;C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.0.0\Microsoft.NETCore.App.deps.json"

@jcansdale
Copy link
Owner Author

jcansdale commented Jul 12, 2016

@anurse Hi Andrew, I'm stuck on an issue related to .deps.json files and assembly loading (see above). I was wondering if you'd be up for taking a look or forwarding me to someone who might know. I've been pulling my hair out for most of today trying to work out what's going on. Thanks, Jamie.

@adamsitnik
Copy link

could you provide your project.json file?

@analogrelay
Copy link

analogrelay commented Jul 12, 2016

Do you have the ability to set an environment variable and capture the stdout/stderr of the process you're launching? If so, set the COREHOST_TRACE environment variable to 1 and run your command again. There will be a lot of console output so I suggest forwarding to a file. Then post the file (via a Gist or something) here? That will help narrow down exactly what's going on.

The deps file does look correct as far as I can tell. It would also help to provide a full listing of the content of the output directory (perhaps easiest done by doing to the root of your project and running tree, again dumping the output to a file; do this after attempting to run the tests). This may be easier to achieve within TD.NET, so feel free to do that first ;).

@jcansdale
Copy link
Owner Author

@adamsitnik,

The project.json is pretty unremarkable. Here is is:

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.0",
    "NUnit": "3.4.1",
    "System.Diagnostics.TraceSource": "4.0.0",
    "Utilities": "1.0.0-*"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

I'll try COREHOST_TRACE=1 and see if that gives us any clues...

@jcansdale
Copy link
Owner Author

@anurse Here is the log with COREHOST_TRACE=1.

I don't know why the error lines are doubled up. Does anything spring to mind?

Here is the gist:
https://gist.github.com/jcansdale/94c1d8567f8153a42a11067d2357a668

Does the following make sense to you?

Error: Added runtime System.Diagnostics.DiagnosticSource deps entry [4] [System.Diagnostics.DiagnosticSource, 4.0.0, lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll]
Error: 
Error: Reconciling library System.Diagnostics.Tools/4.0.1
Error: 
Error: Library System.Diagnostics.Tools/4.0.1 does not exist
Error: 
Error: Reconciling library System.Diagnostics.TraceSource/4.0.0
Error: 
Error: Library System.Diagnostics.TraceSource/4.0.0 does not exist
Error: 
Error: Reconciling library System.Diagnostics.Tracing/4.1.0
Error: 
Error: Library System.Diagnostics.Tracing/4.1.0 does not exist

Thanks, Jamie.

@jcansdale
Copy link
Owner Author

@anurse,

I can see why the lines are doubled up. If you run the following:

        static void Main()
        {
            var startInfo = new ProcessStartInfo("dotnet");
            startInfo.EnvironmentVariables["COREHOST_TRACE"] = "1";
            startInfo.CreateNoWindow = true;
            startInfo.RedirectStandardError = true;
            startInfo.UseShellExecute = false;
            var process = Process.Start(startInfo);

            var text = process.StandardError.ReadToEnd();
            text = text.Replace("\r", "\\r");
            Console.WriteLine(text);
            process.WaitForExit();
        }

...it will output:

Tracing enabled\r\r
--- Invoked dotnet [version: 1.0.1, commit hash: cee57bf6c981237d80aa1631cfe83cb9ba329f12] main = {\r\r
dotnet\r\r
}\r\r
Reading fx resolver directory=[C:\Program Files\dotnet\host\fxr]\r\r
Considering fxr version=[.]...\r\r
Considering fxr version=[..]...\r\r
Considering fxr version=[1.0.1]...\r\r
Detected latest fxr version=[C:\Program Files\dotnet\host\fxr\1.0.1]...\r\r
Resolved fxr [C:\Program Files\dotnet\host\fxr\1.0.1\hostfxr.dll]...\r\r
Loaded library from C:\Program Files\dotnet\host\fxr\1.0.1\hostfxr.dll\r\r
Tracing enabled\r\r
--- Invoked hostfxr [commit hash: cee57bf6c981237d80aa1631cfe83cb9ba329f12] main\r\r
Own DLL path=[C:\Program Files\dotnet\dotnet.dll]\r\r
Checking if CoreCLR path exists=[C:\Program Files\dotnet\coreclr.dll]\r\r
--- Executing in muxer mode...\r\r

It seems lines are being terminated with \r\r\n. 😕 If you use, process.StandardError.ReadLine(), you'll end up with blank lines.

Where would be the best place to report this?

@analogrelay
Copy link

That would go to the https://github.com/dotnet/cli repo

@analogrelay
Copy link

It looks like System.Diagnostics.TraceSource is not part of the shared framework, so System.Diagnostics.TraceSource.dll needs to be adjacent to the entry-point assembly. Is it present there?

The project.json you showed above looked like a library, not an application (since apps need a dependency on Microsoft.NETCore.App and an emitentrypoint build setting). Can you provide a little more detail on how the output project in question is deployed and launched?

@jcansdale
Copy link
Owner Author

@anurse,

The way I'm calling it is a little unusual, but it works most of the time (with both core and 3rd party assemblies).

The command line looks something like this:

dotnet exec --depsfile full\path\to\ClassLibrary.deps.json --additionalprobingpath %USERPROFILE%\.nuget\packages another\full\path\ConsoleApplication.dll

ConsoleApplication.dll loads the ClassLibrary.dll assembly and runs one of its methods using reflection.

It loads the assembly using this:

        public static Assembly LoadFrom(string assemblyFile)
        {
            try
            {
                var assemblyName = AssemblyLoadContext.GetAssemblyName(assemblyFile);
                return Assembly.Load(assemblyName);
            }
            catch(Exception e)
            {
                // this doesn't usually work
                return AssemblyLoadContext.Default.LoadFromAssemblyPath(assemblyFile);
            }
        }

I found that calling AssemblyLoadContext.Default.LoadFromAssemblyPath(assemblyFile) directly doesn't usually work, so I needed to use the more convoluted way.

Is there any way I can make this work consistently? I.e. invoke an arbitrary assembly from a console app. It currently works most of the time. 😉

@analogrelay
Copy link

analogrelay commented Jul 13, 2016

Ah yeah, I see the problem there. The System.Diagnostics.TraceSource library would be in the full\path\to path above because it would have been deployed with the Class Library project, but the actual entry-point assembly is in another\full\path. The directory in which the deps file is located doesn't affect resolution so the System.Diagnostics.TraceSource library needs to either be in the NuGet packages directory (--additionalprobingpath above), organized properly by PackageID and Version, or in the same directory as the entry-point assembly. That or you need to create a custom load context and resolve the paths yourself.

@jcansdale
Copy link
Owner Author

jcansdale commented Jul 13, 2016

so the System.Diagnostics.TraceSource library needs to either be in the NuGet packages directory (--additionalprobingpath above) or in the same directory as the entry-point assembly.

I looks like System.Diagnostics.TraceSource is in the NuGet packages directory. If I execute the following method when it's inside a console application:

        static void trace()
        {
            Console.WriteLine(typeof(Trace).GetTypeInfo().Assembly.Location);
        }

...it outputs this:

------ Test started: Assembly: ConsoleApp1.dll ------

C:\Users\Jamie\.nuget\packages\System.Diagnostics.TraceSource\4.0.0\runtimes\win\lib\netstandard1.3\System.Diagnostics.TraceSource.dll

1 passed, 0 failed, 0 skipped, took 0.44 seconds (.NET Core).

The following works when inside a class library:

        static void test()
        {
            Console.WriteLine(typeof(TestAttribute).GetTypeInfo().Assembly.Location);
        }

...giving me:

------ Test started: Assembly: ClassLibrary1.dll ------

C:\Users\Jamie\.nuget\packages\NUnit\3.4.1\lib\dotnet\nunit.framework.dll

1 passed, 0 failed, 0 skipped, took 0.46 seconds (.NET Core).

...but the trace example gives:

------ Test started: Assembly: ClassLibrary1.dll ------

Test 'M:ClassLibrary1.Class1.trace' failed: Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    File name: 'System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    at ClassLibrary1.Class1.trace()

0 passed, 1 failed, 0 skipped, took 0.56 seconds (.NET Core).

I don't understand what the difference is. From what I can see they're both inside the C:\Users\Jamie\.nuget\packages\ directory. What is there difference? 😕

@analogrelay
Copy link

So to summarize, what you're trying to do is to run a Console App that you provide (aka Runner), using the deps.json file from the Test Assembly?

This isn't really going to be feasible with the current model. Right now, the .NET Core SDK tools make a distinction between a Class Library and a Console Application and do not emit certain data necessary to execute the code unless the project is a Console App. This doesn't normally cause any problems because a Class Library will eventually be referenced by a Console App and the necessary data will be calculated, but in your case you are trying to dynamically launch a Console App using a specific Class Library output. If this scenario is important, I suggest filing a bug on dotnet/cli to help get it tracked for the future (basically just filing a bug with your current scenario and the expected behavior should help make things pretty clear for those folks to start examining the best way to move forward).

In the short term, this is probably a place for a custom AssemblyLoadContext rather than using a different deps file. Deps files are really only designed to describe applications and not libraries. When you need custom logic to handle loading libraries you probably want an AssemblyLoadContext. If you create a custom base class inheriting from AssemblyLoadContext and implement the methods there to resolve assemblies relative to the Assembly Under Test and then use that custom AssemblyLoadContext to perform the initial load of the Assembly Under Test, it should use your custom resolution code to allow you to find the dependencies wherever you need.

Something like the following pseudo-code

public class MyCustomLoadContext : AssemblyLoadContext {
    private string _baseDirectory;
    public MyCustomLoadContext(string baseDirectory) { _baseDirectory = baseDirectory }

    public Assembly Load(AssemblyName name) {
        // Find [name].dll in the _baseDirectory
        // Maybe search NuGet cache? You could, in theory, load the deps file here and do your own processing with it, but it's not quite going to have the data you want...
    }
}

public static void Main(string[] args) {
    var pathOfAssemblyToTest = /* ... */
    var baseDirectory = Path.GetDirectoryName(pathOfAssemblyToTest);
    var name = Path.GetFileNameWithoutExtension(pathOfAssemblyToTest)
    var asm = new MyCustomLoadContext(baseDirectory).Load(name);
    // party time with 'asm'
}

This means you'll be on your own for NuGet package resolution as well unfortunately, since that's only done in the native .NET Core Host start-up code.

I'm sorry it's not a nice easy solution. This isn't a scenario that's really been a priority for the .NET Core 1.0 release so it is a little lacking :(.

@jcansdale
Copy link
Owner Author

@anurse Thanks for taking the time to explain this. I'm still attempting to wrap my head around it. all 😉

I've tried adding a workaround along the lines of your example. Unfortunately the process keeps quitting with an ExecutionEngineException.

Here is a repro:

    using System;
    using System.IO;
    using System.Reflection;
    using System.Runtime.Loader;

    public class Program
    {
        public static void Main(string[] args)
        {
            new MyCustomLoadContext(AssemblyLoadContext.Default);

            var assemblyName = new AssemblyName("System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
            Assembly.Load(assemblyName);
            Console.WriteLine("Done!!!");
        }

        public class MyCustomLoadContext : AssemblyLoadContext
        {
            string packagesDir;

            public MyCustomLoadContext(AssemblyLoadContext parent)
            {
                packagesDir = Environment.ExpandEnvironmentVariables(@"%USERPROFILE%\.nuget\packages");
                parent.Resolving += Parent_Resolving;
            }

            private Assembly Parent_Resolving(AssemblyLoadContext context, AssemblyName assemblyName)
            {
                Console.WriteLine("Resolving: " + assemblyName);
                return Load(assemblyName);
            }

            protected override Assembly Load(AssemblyName assemblyName)
            {
                var version = assemblyName.Version;
                var semver = version.Major + "." + version.Minor + "." + version.Revision;
                var path = string.Format(@"{0}\{1}\runtimes\win\lib\netstandard1.3\{0}.dll",
                    assemblyName.Name, semver);
                var assemblyFile = Path.Combine(packagesDir, path);
                Console.WriteLine(assemblyFile + ": " + File.Exists(assemblyFile));
                var asm = LoadFromAssemblyPath(assemblyFile);
                Console.WriteLine("Loaded: " + asm);
                return asm;
            }
        }
    }

...this outputs the following (never getting to "Done!!!"):

Resolving: System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
C:\Users\Jamie\.nuget\packages\System.Diagnostics.TraceSource\4.0.0\runtimes\win\lib\netstandard1.3\System.Diagnostics.TraceSource.dll: True
Loaded: System.Diagnostics.TraceSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Any idea what's going wrong?

@analogrelay
Copy link

That's not the pattern I'm familiar with for working with Load Contexts. Generally, you create your custom context and implement Load (by using the other methods available on the base class), then you construct your custom context and call Load on it directly.

I'm not sure if that's what's causing the issue but it wouldn't surprise me too much. The idea here is to load your target assembly and all it's dependencies using that load context, which is what the pattern I referenced above should do.

@jcansdale
Copy link
Owner Author

@anurse I've been having a frustrating time trying to get AssemblyLoadContext to work. Where is the best place to find documentation for this part of the framework?

I keep running into an issue where resolving an assembly causes the process to quit with a System.ExecutionEngineException. The same assembly can be loaded fine outside of the resolving event using AssemblyLoadContext.Default.LoadFromAssemblyPath(assemblyPath). In fact, pre-loading the assembly like this would be a workaround for my original issue.

Here is a repro test/console app:
System.Runtime.Loader.Tests.zip

On my machine it fails like this:
assemblyloadcontext_resolving

@jcansdale
Copy link
Owner Author

This is a known issue in the .NET Core 1.0 release. Should be fixed in next version. See:
https://github.com/dotnet/corefx/issues/10365

Workaround is to pre-load and dependent assemblies.

@jcansdale jcansdale added this to the v4.0-beta milestone Aug 1, 2016
@analogrelay
Copy link

Glad you found an answer, sorry I hadn't gotten a chance to look in to this!

@jcansdale
Copy link
Owner Author

jcansdale commented Aug 1, 2016

@anurse No problem, I appreciated your earlier input!

I see there's as issue for AssemblyLoadContext documentation here:
https://github.com/dotnet/coreclr/issues/5463

Subscribed. 😄

@analogrelay
Copy link

I did hear they were getting some docs together, so hopefully progress will be made there soon :)

@jcansdale
Copy link
Owner Author

Added a workaround that fixes this for System.Diagnostics.TraceSource. Not ideal, but at least I understand what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants