Skip to content

NuGetDepsJsonResolver

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

Resolves assembly references by consulting the referencing assembly’s .deps.json file to locate its NuGet dependencies in the NuGet global packages folder. This is the probe step that makes library projects work — dotnet build does not copy NuGet package assemblies next to a library’s bin output, but the .deps.json manifest records the exact resolved package version and runtime asset path, matching what the .NET host uses at runtime.

public static class NuGetDepsJsonResolver

ObjectNuGetDepsJsonResolver

Attempts to locate assemblyName in the referencing assembly’s .deps.json manifest and resolve it against the NuGet global packages folder.

Parameters:

  • referencingAssemblyPath (String): Path of the assembly whose .deps.json is consulted.
  • assemblyName (String): Simple name of the assembly to locate (e.g. Newtonsoft.Json).

Returns: ResolvedAssembly

A FromFile pointing at the packaged dll, or null.

public static ResolvedAssembly? TryResolve(string referencingAssemblyPath, string assemblyName)