private ProjectFileInfo CreateProjectFileInfo(OmniSharpTestHost host, ITestProject testProject, string projectFilePath) { var msbuildLocator = host.GetExport <IMSBuildLocator>(); var sdksPathResolver = host.GetExport <SdksPathResolver>(); var loader = new ProjectLoader( options: new MSBuildOptions(), solutionDirectory: testProject.Directory, propertyOverrides: msbuildLocator.RegisteredInstance.PropertyOverrides, loggerFactory: LoggerFactory, sdksPathResolver: sdksPathResolver); var(projectFileInfo, _) = ProjectFileInfo.Load(projectFilePath, loader); return(projectFileInfo); }
private ProjectFileInfo CreateProjectFileInfo(OmniSharpTestHost host, ITestProject testProject, string projectFilePath) { var msbuildLocator = host.GetExport <IMSBuildLocator>(); var sdksPathResolver = host.GetExport <SdksPathResolver>(); var dotNetCli = host.GetExport <IDotNetCliService>(); var loader = new ProjectLoader( options: new MSBuildOptions(), solutionDirectory: testProject.Directory, propertyOverrides: msbuildLocator.RegisteredInstance.PropertyOverrides, loggerFactory: LoggerFactory, sdksPathResolver: sdksPathResolver); var projectIdInfo = new ProjectIdInfo(ProjectId.CreateNewId(), false); var(projectFileInfo, _, _) = ProjectFileInfo.Load(projectFilePath, projectIdInfo, loader, sessionId: Guid.NewGuid(), dotNetCli); return(projectFileInfo); }
private ProjectFileInfo LoadProject(string projectFilePath) => LoadOrReloadProject(projectFilePath, () => ProjectFileInfo.Load(projectFilePath, _projectLoader));