private string GetSystemAssemblyPath(PlatformInfo platformInfo, string systemAssemblyName) { foreach (FileSystemPath systemAssemblyFolder in platformInfo.GetSystemAssemblyFolders()) { string pathForTring = Path.Combine(systemAssemblyFolder.ToString(), systemAssemblyName + ".dll"); if (File.Exists(pathForTring)) return pathForTring; } throw new ArgumentException("Assembly does not exissts in system directories", "systemAssemblyName"); }