private AnalyzerFileReference ResolveAnalyzerReference(CommandLineAnalyzerReference reference, IAnalyzerAssemblyLoader analyzerLoader) { string resolvedPath = FileUtilities.ResolveRelativePath(reference.FilePath, basePath: null, baseDirectory: BaseDirectory, searchPaths: ReferencePaths, fileExists: PortableShim.File.Exists); if (resolvedPath != null) { resolvedPath = FileUtilities.TryNormalizeAbsolutePath(resolvedPath); } if (resolvedPath != null) { return new AnalyzerFileReference(resolvedPath, analyzerLoader); } return null; }
private AnalyzerFileReference ResolveAnalyzerReference(CommandLineAnalyzerReference reference, Func<string, Assembly> getAssembly) { string resolvedPath = FileUtilities.ResolveRelativePath(reference.FilePath, basePath: null, baseDirectory: BaseDirectory, searchPaths: ReferencePaths, fileExists: File.Exists); if (File.Exists(resolvedPath)) { resolvedPath = FileUtilities.TryNormalizeAbsolutePath(resolvedPath); } else { resolvedPath = null; } if (resolvedPath != null) { return new AnalyzerFileReference(resolvedPath, getAssembly); } return null; }