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 NuGetDepsJsonResolverInheritance
Section titled “Inheritance”Object → NuGetDepsJsonResolver
Methods
Section titled “Methods”TryResolve(string, string)
Section titled “TryResolve(string, string)”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.jsonis 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)