public void GetsVirtualProjectSourceFiles(string projectFile) { // Given StringWriter log = new StringWriter(); projectFile = GetProjectPath(projectFile); XDocument projectDocument = XDocument.Load(projectFile); projectFile = projectFile.Replace(".csproj", "Virtual.csproj"); ProjectAnalyzer analyzer = new AnalyzerManager( new AnalyzerManagerOptions { LogWriter = log, LoggerVerbosity = Verbosity }) .GetProject(projectFile, projectDocument); // When IReadOnlyList <string> sourceFiles = analyzer.BuildAllTargetFrameworks().First().GetSourceFiles(); // Then sourceFiles.ShouldNotBeNull(log.ToString()); sourceFiles.ShouldContain(x => x.EndsWith("Class1.cs"), log.ToString()); }