private static string GetLocation(Type type) { foreach (var method in type.GetMethods()) { var location = string.Empty; try { using (var symbolProvider = new SymbolProvider("./", SymbolProvider.SymSearchPolicies.AllowOriginalPathAccess)) { var sourceLocation = symbolProvider.GetSourceLoc(method, 0); if (!string.IsNullOrWhiteSpace(sourceLocation.Url)) { return(sourceLocation.Url); } } } catch { } } return(null); }