Example #1
0
        private bool TryPopulateMetadataReferences(PackageDescription description, FrameworkName targetFramework, IDictionary <string, IMetadataReference> paths)
        {
            var group = description.Package.LockFileLibrary.FrameworkGroups.FirstOrDefault(f => f.TargetFramework == targetFramework);

            if (group == null)
            {
                return(false);
            }

            foreach (var assemblyPath in group.CompileTimeAssemblies)
            {
                var name = Path.GetFileNameWithoutExtension(assemblyPath);
                var path = Path.Combine(description.Library.Path, assemblyPath);
                paths[name] = new MetadataFileReference(name, path);
            }
            return(true);
        }
Example #2
0
        private bool TryPopulateMetadataReferences(PackageDescription description, FrameworkName targetFramework, IDictionary<string, IMetadataReference> paths)
        {
            var group = description.Package.LockFileLibrary.FrameworkGroups.FirstOrDefault(f => f.TargetFramework == targetFramework);
            if (group == null)
            {
                return false;
            }

            foreach (var assemblyPath in group.CompileTimeAssemblies)
            {
                var name = Path.GetFileNameWithoutExtension(assemblyPath);
                var path = Path.Combine(description.Library.Path, assemblyPath);
                paths[name] = new MetadataFileReference(name, path);
            }
            return true;
        }