2 instantiations of LibraryType
NuGet.LibraryModel (2)
LibraryType.cs (2)
65return new LibraryType(value, false); 109var buildAction = new LibraryType(name, true);
110 references to LibraryType
dotnet (1)
ToolPackage\ToolPackageDownloader.cs (1)
161Type = LibraryType.Package,
Microsoft.Build.NuGetSdkResolver (1)
NuGetSdkResolver.cs (1)
190var libraryIdentity = new LibraryIdentity(sdk.Name, parsedSdkVersion, LibraryType.Package);
Microsoft.NET.Build.Tasks (7)
LockFileLookup.cs (7)
24var libraryType = LibraryType.Parse(library.Type); 26if (libraryType == LibraryType.Package) 30if (libraryType == LibraryType.Project) 61var libraryType = LibraryType.Parse(targetLibrary.Type); 62if (libraryType == LibraryType.Package)
NuGet.CommandLine.XPlat (10)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (8)
285(LibraryType libraryType, resolvedVersion) = GetPackageVersionFromRestoreResult(restoreResult, packageId, userSpecifiedFrameworks); 287if (libraryType == LibraryType.Unresolved) 295if (libraryType == LibraryType.Project || 296libraryType == LibraryType.ExternalProject) 455private static (LibraryType, NuGetVersion) GetPackageVersionFromRestoreResult(RestoreResult restoreResult, 487if (firstMatchingEntry.Key.Type == LibraryType.Project || 488firstMatchingEntry.Key.Type == LibraryType.ExternalProject) 499return (LibraryType.Unresolved, null);
Commands\Why\DependencyGraphFinder.cs (2)
128Type = LibraryType.Project, 187if (library.Type!.Equals(LibraryType.Package, StringComparison.OrdinalIgnoreCase))
NuGet.Commands (55)
PackagesLockFileBuilder.cs (6)
23var libraryLookup = assetsFile.Libraries.Where(e => e.Type == LibraryType.Package) 46foreach (var library in libraries.Where(e => e.Type == LibraryType.Package)) 90.Where(l => l.Type == LibraryType.Project || l.Type == LibraryType.ExternalProject) 93foreach (var projectReference in libraries.Where(e => e.Type == LibraryType.Project || e.Type == LibraryType.ExternalProject))
RestoreCommand\CompatibilityChecker.cs (1)
73if (node.Key.Type == LibraryType.Project)
RestoreCommand\DependencyGraphResolver.cs (8)
591if (newGraphNode.Item.Key.Type != LibraryType.Project 592&& newGraphNode.Item.Key.Type != LibraryType.ExternalProject 593&& newGraphNode.Item.Key.Type != LibraryType.Unresolved 610LibraryType.Package)), 630if (newGraphNode.Item.Key.Type == LibraryType.Unresolved) 688LibraryType.Package)), 827return resolvedDependencyGraphItem.Item.Key.Type == LibraryType.Project; 1017&& currentGraphItem.Key.Type == LibraryType.Project)
RestoreCommand\Diagnostics\DiagnosticUtility.cs (1)
29if (identity.Version != null && identity.Type == LibraryType.Package)
RestoreCommand\Diagnostics\IndexedRestoreTargetGraph.cs (1)
85public GraphItem<RemoteResolveResult> GetItemById(string id, LibraryType libraryType)
RestoreCommand\Diagnostics\UnexpectedDependencyMessages.cs (3)
158var match = indexedGraph.GetItemById(dependency.Name, LibraryType.Package); 223if (dependency.Child.Type != LibraryType.Package) 274var match = indexedGraph.GetItemById(dependencyId, LibraryType.Package);
RestoreCommand\DownloadDependencyResolutionResult.cs (2)
52if (LibraryType.Unresolved == dependency.Item2.Library.Type) 56else if (LibraryType.Package == dependency.Item2.Library.Type)
RestoreCommand\LockFileBuilder.cs (9)
73if (library.Type == LibraryType.Project || library.Type == LibraryType.ExternalProject) 108Type = LibraryType.Project, 113else if (library.Type == LibraryType.Package) 204if (library.Type == LibraryType.Project || library.Type == LibraryType.ExternalProject) 221else if (library.Type == LibraryType.Package) 534|| node.Item.Key.Type == LibraryType.Unresolved 668Type = LibraryType.Package,
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (3)
526private static bool IsProject(LibraryType type) 528return (type == LibraryType.ExternalProject || type == LibraryType.Project);
RestoreCommand\OriginalCaseGlobalPackageFolder.cs (2)
76.Where(remoteMatch => remoteMatch.Library.Type == LibraryType.Package); 141if (library.Type == LibraryType.Package)
RestoreCommand\ProjectRestoreCommand.cs (1)
496if (match == null || match.Library.Type != LibraryType.Package)
RestoreCommand\RestoreCommand.cs (3)
1339foreach (var library in assetsFile.Libraries.Where(lib => lib.Type == LibraryType.Package)) 1423.Select(dep => new LibraryIdentity(dep.Id, dep.ResolvedVersion, LibraryType.Package)) 1708graph.Flattened.Where(e => e.Key.Type != LibraryType.Package)
RestoreCommand\RestoreTargetGraph.cs (2)
160if (node?.Item?.Key?.Type == LibraryType.Unresolved) 175if (node?.OuterNode != null && node.Item.Key.Type != LibraryType.Unresolved)
RestoreCommand\SourceRepositoryDependencyProvider.cs (2)
270Type = LibraryType.Package 287Type = LibraryType.Package
RestoreCommand\Utility\AuditUtility.cs (2)
222if (graph.Flattened.Any(r => r.Key.Type == LibraryType.Package)) 382foreach (GraphItem<RemoteResolveResult>? node in graph.Flattened.Where(r => r.Key.Type == LibraryType.Package))
RestoreCommand\Utility\BuildAssetsUtils.cs (1)
515targetGraph.Flattened.Where(e => e.Key.Type == LibraryType.Package)
RestoreCommand\Utility\IncludeFlagUtils.cs (6)
208return item.Key.Type == LibraryType.Package 209|| item.Key.Type == LibraryType.Project 210|| item.Key.Type == LibraryType.ExternalProject; 220if (item.Key.Type == LibraryType.Project) 224else if (item.Key.Type == LibraryType.ExternalProject) 228else if (item.Key.Type == LibraryType.Package)
RestoreCommand\Utility\LockFileUtils.cs (2)
187Type = LibraryType.Package, 517Type = LibraryType.Project,
NuGet.DependencyResolver.Core (3)
GraphModel\GraphOperations.cs (1)
338if ((node.Item?.Key?.Type == LibraryType.Package) == true)
Remote\RemoteWalkContext.cs (1)
115if (item.Key.Type == LibraryType.Unresolved || !RemoteLibraryProviders.Contains(item.Data.Match.Provider))
ResolverUtility.cs (1)
575Type = LibraryType.Unresolved,
NuGet.LibraryModel (27)
LibraryIdentity.cs (2)
18public LibraryIdentity(string name, NuGetVersion version, LibraryType type) 29public required LibraryType Type { get; set; }
LibraryRange.cs (3)
65contraintString = LibraryType.Reference; 68contraintString = LibraryType.ExternalProject; 72contraintString = LibraryType.Project;
LibraryType.cs (22)
9public struct LibraryType : IEquatable<LibraryType> 11private static ConcurrentDictionary<string, LibraryType> _knownLibraryTypes = new ConcurrentDictionary<string, LibraryType>(StringComparer.OrdinalIgnoreCase); 15public static readonly LibraryType Project = Define("project"); 20public static readonly LibraryType ExternalProject = Define("externalProject"); 25public static readonly LibraryType Package = Define("package"); 30public static readonly LibraryType Assembly = Define("assembly"); 36public static readonly LibraryType Reference = Define("reference"); 41public static readonly LibraryType WinMD = Define("winmd"); 46public static readonly LibraryType Unresolved = Define("unresolved"); 58public static LibraryType Parse(string value) 60LibraryType action; 73public bool Equals(LibraryType other) 80return obj is LibraryType && Equals((LibraryType)obj); 83public static bool operator ==(LibraryType left, LibraryType right) 88public static bool operator !=(LibraryType left, LibraryType right) 93public static implicit operator string(LibraryType libraryType) 107private static LibraryType Define(string name) 109var buildAction = new LibraryType(name, true);
NuGet.PackageManagement (5)
BuildIntegration\BuildIntegratedRestoreUtility.cs (2)
78.Where(library => library.Type == LibraryType.Package) 92.Where(library => library.Type == LibraryType.Package)
InstallationCompatibility.cs (1)
55.Where(result => result.Key.Type == LibraryType.Package)
Utility\BuildIntegratedProjectUtility.cs (2)
78.Where(library => library.Type == LibraryType.Package) 108LibraryType.Parse(targetLibrary.Type));
NuGet.ProjectModel (1)
PackageSpecReferenceDependencyProvider.cs (1)
145Type = LibraryType.Project,