示例#1
0
        public static async Task <ProjectWithCodeAnalysis> OpenAsync(string fileName)
        {
            MSBuildWorkspace workspace = CodeAnalysisWorkspace.Create();

            return(new SolutionWithCodeAnalysis(
                       workspace,
                       (await workspace.OpenProjectAsync(fileName)).Solution).Projects.First());
        }
        public static async Task <SolutionWithCodeAnalysis> OpenAsync(string fileName)
        {
            MSBuildWorkspace workspace = CodeAnalysisWorkspace.Create();

            return(new SolutionWithCodeAnalysis(workspace, await workspace.OpenSolutionAsync(fileName)));
        }