Beispiel #1
0
        public IReadOnlyDictionary <string, ContentItemGroup> GetRuntimeItems(NuGetFramework framework, string runtimeIdentifier)
        {
            var managedCriteria = _conventions.Criteria.ForFrameworkAndRuntime(framework, runtimeIdentifier);

            NuGetAssetResolver.FixCriteria(managedCriteria);

            Dictionary <string, ContentItemGroup> resolvedAssets = new Dictionary <string, ContentItemGroup>();

            foreach (var package in _packages.Keys)
            {
                resolvedAssets.Add(package,
                                   _packages[package].FindBestItemGroup(managedCriteria,
                                                                        _conventions.Patterns.RuntimeAssemblies));
            }

            return(resolvedAssets);
        }
Beispiel #2
0
        public IReadOnlyDictionary <string, ContentItemGroup> GetCompileItems(NuGetFramework framework)
        {
            // don't use the RID for compile assets.
            var managedCriteria = _conventions.Criteria.ForFramework(framework);

            NuGetAssetResolver.FixCriteria(managedCriteria);

            Dictionary <string, ContentItemGroup> resolvedAssets = new Dictionary <string, ContentItemGroup>();

            // compile falls back to runtime pattern in the case of lib with no ref, this won't fallback
            // to a runtime asset since we have no RID passed in.
            foreach (var package in _packages.Keys)
            {
                resolvedAssets.Add(package,
                                   _packages[package].FindBestItemGroup(managedCriteria,
                                                                        _conventions.Patterns.CompileAssemblies,
                                                                        _conventions.Patterns.RuntimeAssemblies));
            }

            return(resolvedAssets);
        }