private IEnumerable <MetadataReference> GetDefaultReferences(string sdk, bool wpf, bool winforms, IEnumerable <MetadataReference> existingReferences = null) { var references = new List <MetadataReference>(); var existingRefNames = new List <string>(); if (existingReferences != null) { existingRefNames = existingReferences?.Select(x => Path.GetFileName(x.Display)).ToList(); } var packDir = DotNetInfo.GetPackPath(sdk); var xmlPath = Path.Combine(packDir, "data", "FrameworkList.xml"); var netCoreAppRefs = new XmlSerializer(typeof(FileList)).Deserialize(new StringReader(File.ReadAllText(xmlPath))) as FileList; foreach (var item in netCoreAppRefs.Files) { var path = Path.Combine(DotNetInfo.PacksPath, packDir, string.Empty, item.Path.Replace("/", "\\")); if ((!wpf && string.Equals(item.Profile, "WPF")) || (!winforms && string.Equals(item.Profile, "WindowsForms"))) { continue; } if (!existingRefNames.Contains(Path.GetFileName(path))) { references.Add(MetadataReference.CreateFromFile(path, default, GetXmlDocumentationProvider(path)));
protected override void OnStartup(StartupEventArgs e) { System.Windows.Forms.Application.EnableVisualStyles(); Korduene.Current.Instance.UIServices = UIServices.Instance; DotNetInfo.SetEnvironmentVariables(); base.OnStartup(e); }