public MetadataReference[] GetDefaultAssemblies() { var installation = dotNetInstallationLocator.GetReferenceAssemblyPath() ?? throw new InvalidOperationException("Could not find dotnet installation"); return(GroupDirectoryContentsIntoAssemblies( io.GetFilesInDirectory(installation.ImplementationPath, "*.dll", SearchOption.AllDirectories) .Union(io.GetFilesInDirectory(installation.DocumentationPath, "*.xml", SearchOption.AllDirectories)) ) .Where(assembly => assembly.AssemblyName.StartsWith("System")) .Select(assembly => io.CreateMetadataReferenceWithDocumentation(assembly)) .ToArray()); }
public MetadataReference[] GetDefaultAssemblies() { var installation = dotNetInstallationLocator.GetReferenceAssemblyPath() ?? throw new InvalidOperationException("Could not find dotnet installation"); // get SDK DLLs var implementationPath = Path.Combine(installation.BasePath, "shared", "Microsoft.NETCore.App", installation.Version); // get xml documentation for those DLLs var referencePath = Path.Combine(installation.BasePath, "packs", "Microsoft.NETCore.App.Ref", installation.Version, "ref"); return(GroupDirectoryContentsIntoAssemblies( io.GetFilesInDirectory(implementationPath, "*.dll", SearchOption.AllDirectories) .Union(io.GetFilesInDirectory(referencePath, "*.xml", SearchOption.AllDirectories)) ) .Where(assembly => assembly.AssemblyName.StartsWith("System")) .Select(assembly => io.CreateMetadataReferenceWithDocumentation(assembly)) .ToArray()); }