private static ProjectId AddProject(ref Solution solution, int index, string projectName)
 {
     ProjectId projectId = ProjectId.CreateNewId(debugName: projectName);
     solution = solution.AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), projectName, projectName, LanguageNames.CSharp, projectName));
     return projectId;
 }
Пример #2
0
 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);
 }