Esempio n. 1
0
 private LibraryExport ExportProject(LibraryDescription library, string aspect)
 {
     return(ProjectExporter.ExportProject(
                ((ProjectDescription)library).Project,
                _compilationEngine,
                aspect,
                _targetFramework,
                _configuration));
 }
Esempio n. 2
0
        public Assembly LoadProject(Project project, string aspect, IAssemblyLoadContext loadContext)
        {
            // Export the project
            var export = ProjectExporter.ExportProject(project, this, aspect, _context.TargetFramework, _context.Configuration);

            // Load the metadata reference
            foreach (var projectReference in export.MetadataReferences.OfType <IMetadataProjectReference>())
            {
                if (string.Equals(projectReference.Name, project.Name, StringComparison.OrdinalIgnoreCase))
                {
                    return(projectReference.Load(loadContext));
                }
            }

            return(null);
        }