private Project CreateSubmissionProject(Solution solution, CSharpCompilationOptions compilationOptions, Project previousProject) { var name = "Program" + _documentNumber++; var id = ProjectId.CreateNewId(name); solution = solution.AddProject(ProjectInfo.Create( id, VersionStamp.Create(), name, name, LanguageNames.CSharp, isSubmission: true, parseOptions: _parseOptions, compilationOptions: compilationOptions.WithScriptClassName(name), metadataReferences: previousProject != null ? ImmutableArray <MetadataReference> .Empty : DefaultReferences)); var project = solution.GetProject(id); if (previousProject != null) { project = project.AddProjectReference(new ProjectReference(previousProject.Id)); } return(project); }
private Project CreateSubmissionProject(Solution solution, CSharpCompilationOptions compilationOptions) { var name = "Program" + _documentNumber++; var id = ProjectId.CreateNewId(name); solution = solution.AddProject(ProjectInfo.Create(id, VersionStamp.Create(), name, name, LanguageNames.CSharp, parseOptions: _parseOptions, compilationOptions: compilationOptions.WithScriptClassName(name), metadataReferences: DefaultReferences)); return(solution.GetProject(id)); }
private Project CreateSubmissionProject(Solution solution) { string name = "Program" + 1; ProjectId id = ProjectId.CreateNewId(name); solution = solution.AddProject(ProjectInfo.Create(id, VersionStamp.Create(), name, name, LanguageNames.CSharp, parseOptions: _parseOptions, compilationOptions: _compilationOptions.WithScriptClassName(name), metadataReferences: _references)); return(solution.GetProject(id)); }
private Project CreateSubmissionProject(Solution solution) { string name = "Program" + _documentNumber++; ProjectId id = ProjectId.CreateNewId(name); solution = solution.AddProject(ProjectInfo.Create(id, VersionStamp.Create(), name, name, LanguageNames.CSharp, parseOptions: _parseOptions, compilationOptions: _compilationOptions.WithScriptClassName(name), metadataReferences: _references)); //if (_previousProjectId != null) //{ // solution = solution.AddProjectReference(id, new ProjectReference(_previousProjectId)); //} return(solution.GetProject(id)); }