private ProjectFileInfo CreateProjectFileInfo(ErgonProjectInstance project) { var commandLineArgs = GetCommandLineArgs(project); var outputFilePath = project.ReadPropertyString(PropertyNames.TargetPath); if (!string.IsNullOrWhiteSpace(outputFilePath)) { outputFilePath = GetAbsolutePathRelativeToProject(outputFilePath); } var outputRefFilePath = project.ReadPropertyString(PropertyNames.TargetRefPath); if (!string.IsNullOrWhiteSpace(outputRefFilePath)) { outputRefFilePath = GetAbsolutePathRelativeToProject(outputRefFilePath); } // Right now VB doesn't have the concept of "default namespace". But we conjure one in workspace // by assigning the value of the project's root namespace to it. So various feature can choose to // use it for their own purpose. // In the future, we might consider officially exposing "default namespace" for VB project // (e.g. through a <defaultnamespace> msbuild property) var defaultNamespace = project.ReadPropertyString(PropertyNames.RootNamespace) ?? string.Empty; var targetFramework = project.ReadPropertyString(PropertyNames.TargetFramework); if (string.IsNullOrWhiteSpace(targetFramework)) { targetFramework = null; } var docs = project.GetDocuments() .Where(IsNotTemporaryGeneratedFile) .Select(MakeDocumentFileInfo) .ToImmutableArray(); var additionalDocs = project.GetAdditionalFiles() .Select(MakeAdditionalDocumentFileInfo) .ToImmutableArray(); return(ProjectFileInfo.Create( Language, project.FullPath, outputFilePath, outputRefFilePath, defaultNamespace, targetFramework, commandLineArgs, docs, additionalDocs, project.GetProjectReferences().ToImmutableArray(), Log)); }
protected void ReadAdditionalFiles() { var additionalFiles = Project.GetAdditionalFiles(); if (additionalFiles != null) { foreach (var additionalFile in additionalFiles) { Add("additionalfile", GetDocumentFilePath(additionalFile)); } } }