示例#1
0
 public static ProjectInfo CreateProjectInfo(this ProjectFileInfo projectFileInfo)
 {
     return(ProjectInfo.Create(
                id: projectFileInfo.Id,
                version: VersionStamp.Create(),
                name: projectFileInfo.Name,
                assemblyName: projectFileInfo.AssemblyName,
                language: LanguageNames.CSharp,
                filePath: projectFileInfo.FilePath,
                outputFilePath: projectFileInfo.TargetPath,
                compilationOptions: projectFileInfo.CreateCompilationOptions()));
 }
示例#2
0
        public static ProjectInfo CreateProjectInfo(this ProjectFileInfo projectFileInfo, IAnalyzerAssemblyLoader analyzerAssemblyLoader)
        {
            var analyzerReferences = ResolveAnalyzerReferencesForProject(projectFileInfo, analyzerAssemblyLoader);

            return(ProjectInfo.Create(
                       id: projectFileInfo.Id,
                       version: VersionStamp.Create(),
                       name: projectFileInfo.Name,
                       assemblyName: projectFileInfo.AssemblyName,
                       language: LanguageNames.CSharp,
                       filePath: projectFileInfo.FilePath,
                       outputFilePath: projectFileInfo.TargetPath,
                       compilationOptions: projectFileInfo.CreateCompilationOptions(),
                       analyzerReferences: analyzerReferences));
        }
        public static CSharpCompilationOptions CreateCompilationOptions(this ProjectFileInfo projectFileInfo)
        {
            var compilationOptions = new CSharpCompilationOptions(projectFileInfo.OutputKind);

            return(projectFileInfo.CreateCompilationOptions(compilationOptions));
        }