Ejemplo n.º 1
0
 public DesignTimeAssemblyLoadContextFactory(Project project,
                                             IApplicationEnvironment appEnv,
                                             ICache cache,
                                             ICacheContextAccessor cacheContextAccessor,
                                             INamedCacheDependencyProvider namedDependencyProvider)
 {
     _project = project;
     _appEnv  = appEnv;
     _cache   = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
 }
 public DesignTimeAssemblyLoadContextFactory(Project project,
                                             IApplicationEnvironment appEnv,
                                             ICache cache,
                                             ICacheContextAccessor cacheContextAccessor,
                                             INamedCacheDependencyProvider namedDependencyProvider)
 {
     _project = project;
     _appEnv = appEnv;
     _cache = cache;
     _cacheContextAccessor = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
 }
Ejemplo n.º 3
0
   public FSharpCompiler(
 ICache cache,
 ICacheContextAccessor cacheContextAccessor,
 INamedCacheDependencyProvider namedDependencyProvider,
 IApplicationEnvironment environment,
 IServiceProvider services)
   {
       _cache = cache;
         _cacheContextAccessor = cacheContextAccessor;
         _namedDependencyProvider = namedDependencyProvider;
         _environment = environment;
         _services = services;
   }
Ejemplo n.º 4
0
 public FSharpCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedDependencyProvider,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _cache = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _environment             = environment;
     _services = services;
 }
Ejemplo n.º 5
0
 public ApplicationContext(IServiceProvider services,
                           ICache cache,
                           ICacheContextAccessor cacheContextAccessor,
                           INamedCacheDependencyProvider namedDependencyProvider,
                           int id)
 {
     _hostServices            = services;
     _appEnv                  = (IApplicationEnvironment)services.GetService(typeof(IApplicationEnvironment));
     _cache                   = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     Id = id;
 }
Ejemplo n.º 6
0
 public FSharpProjectCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _compiler = new FSharpCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         environment,
         services);
 }
Ejemplo n.º 7
0
 public RoslynCompiler(ICache cache,
                       ICacheContextAccessor cacheContextAccessor,
                       INamedCacheDependencyProvider namedDependencyProvider,
                       IAssemblyLoadContextFactory loadContextFactory,
                       IFileWatcher watcher,
                       IServiceProvider services)
 {
     _cache = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _loadContextFactory      = loadContextFactory;
     _watcher  = watcher;
     _services = services;
 }
Ejemplo n.º 8
0
 public FSharpProjectCompiler(
   ICache cache,
   ICacheContextAccessor cacheContextAccessor,
   INamedCacheDependencyProvider namedCacheProvider,
   IApplicationEnvironment environment,
   IServiceProvider services)
 {
   _compiler = new FSharpCompiler(
     cache,
     cacheContextAccessor,
     namedCacheProvider,
     environment,
     services);
 }
Ejemplo n.º 9
0
 public InternalRoslynCompiler(ICache cache,
                       ICacheContextAccessor cacheContextAccessor,
                       INamedCacheDependencyProvider namedDependencyProvider,
                       IAssemblyLoadContextFactory loadContextFactory,
                       IFileWatcher watcher,
                       IApplicationEnvironment environment,
                       IServiceProvider services) {
     _cache = cache;
     _cacheContextAccessor = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _loadContextFactory = loadContextFactory;
     _watcher = watcher;
     _environment = environment;
     _services = services;
 }
Ejemplo n.º 10
0
 public RoslynProjectCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IAssemblyLoadContext loadContext,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _compiler = new RoslynCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         loadContext,
         environment,
         services);
 }
Ejemplo n.º 11
0
 public RoslynProjectReferenceProvider(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IAssemblyLoadContextFactory loadContextFactory,
     IFileWatcher watcher,
     IServiceProvider services)
 {
     _compiler = new RoslynCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         loadContextFactory,
         watcher,
         services);
 }
Ejemplo n.º 12
0
 public ConnectionContext(IDictionary <int, ApplicationContext> contexts,
                          IServiceProvider services,
                          ICache cache,
                          ICacheContextAccessor cacheContextAccessor,
                          INamedCacheDependencyProvider namedDependencyProvider,
                          ProcessingQueue queue,
                          string hostId)
 {
     _contexts                = contexts;
     _services                = services;
     _cache                   = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _queue                   = queue;
     _hostId                  = hostId;
 }
Ejemplo n.º 13
0
 public RoslynCompiler(ICache cache,
                       ICacheContextAccessor cacheContextAccessor,
                       INamedCacheDependencyProvider namedDependencyProvider,
                       IAssemblyLoadContext loadContext,
                       IFileWatcher watcher,
                       IApplicationEnvironment environment,
                       IServiceProvider services)
 {
     _cache = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _loadContext             = loadContext;
     _watcher     = watcher;
     _environment = environment;
     _services    = services;
 }
Ejemplo n.º 14
0
 public RoslynProjectCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IAssemblyLoadContext loadContext,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _compiler = new RoslynCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         loadContext,
         environment,
         services);
 }
Ejemplo n.º 15
0
 public ConnectionContext(IDictionary<int, ApplicationContext> contexts,
                          IServiceProvider services,
                          ICache cache,
                          ICacheContextAccessor cacheContextAccessor,
                          INamedCacheDependencyProvider namedDependencyProvider,
                          ProcessingQueue queue,
                          string hostId)
 {
     _contexts = contexts;
     _services = services;
     _cache = cache;
     _cacheContextAccessor = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _queue = queue;
     _hostId = hostId;
 }
 public FSharpProjectCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IAssemblyLoadContextFactory loadContextFactory,
     IFileWatcher watcher,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _compiler = new FSharpCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         loadContextFactory,
         watcher,
         environment,
         services);
 }
 public FSharpProjectCompiler(
   ICache cache,
   ICacheContextAccessor cacheContextAccessor,
   INamedCacheDependencyProvider namedCacheProvider,
   IAssemblyLoadContextFactory loadContextFactory,
   IFileWatcher watcher,
   IApplicationEnvironment environment,
   IServiceProvider services)
 {
   _compiler = new FSharpCompiler(
     cache,
     cacheContextAccessor,
     namedCacheProvider,
     loadContextFactory,
     watcher,
     environment,
     services);
 }
 public PostSharpProjectCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IAssemblyLoadContext loadContext,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _services = services;
     _compiler = new RoslynCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         loadContext,
         environment,
         services);
     _cache            = cache;
     _workingDirectory = cache.Get <string>("PostSharp.Dnx.WorkingDirectory", cacheContext => Path.Combine(Path.GetTempPath(), "PostSharp.Dnx", Guid.NewGuid().ToString()));
     Task.Run(() => PurgeWorkingDirectories());
     CreateWorkingDirectory();
 }
 public PostSharpProjectCompiler(
     ICache cache,
     ICacheContextAccessor cacheContextAccessor,
     INamedCacheDependencyProvider namedCacheProvider,
     IAssemblyLoadContext loadContext,
     IApplicationEnvironment environment,
     IServiceProvider services)
 {
     _services = services;
     _compiler = new RoslynCompiler(
         cache,
         cacheContextAccessor,
         namedCacheProvider,
         loadContext,
         environment,
         services);
     _cache = cache;
     _workingDirectory = cache.Get<string>("PostSharp.Dnx.WorkingDirectory", cacheContext => Path.Combine(Path.GetTempPath(), "PostSharp.Dnx", Guid.NewGuid().ToString()));
     Task.Run(() => PurgeWorkingDirectories());
     CreateWorkingDirectory();
 }
Ejemplo n.º 20
0
 public RoslynCompiler(ICache cache,
                       ICacheContextAccessor cacheContextAccessor,
                       INamedCacheDependencyProvider namedDependencyProvider,
                       IAssemblyLoadContext loadContext,
                       IApplicationEnvironment environment,
                       IServiceProvider services)
 {
     _cache = cache;
     _cacheContextAccessor    = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _loadContext             = loadContext;
     _environment             = environment;
     _services = services;
     _assemblyMetadataFactory = fileReference =>
     {
         return(_cache.Get <AssemblyMetadata>(fileReference.Path, ctx =>
         {
             ctx.Monitor(new FileWriteTimeCacheDependency(fileReference.Path));
             return fileReference.CreateAssemblyMetadata();
         }));
     };
 }
Ejemplo n.º 21
0
 public RoslynCompiler(ICache cache,
                       ICacheContextAccessor cacheContextAccessor,
                       INamedCacheDependencyProvider namedDependencyProvider,
                       IAssemblyLoadContext loadContext,
                       IApplicationEnvironment environment,
                       IServiceProvider services)
 {
     _cache = cache;
     _cacheContextAccessor = cacheContextAccessor;
     _namedDependencyProvider = namedDependencyProvider;
     _loadContext = loadContext;
     _environment = environment;
     _services = services;
     _assemblyMetadataFactory = fileReference =>
     {
         return _cache.Get<AssemblyMetadata>(fileReference.Path, ctx =>
         {
             ctx.Monitor(new FileWriteTimeCacheDependency(fileReference.Path));
             return fileReference.CreateAssemblyMetadata();
         });
     };
 }
Ejemplo n.º 22
0
        public ApplicationHostContext(IServiceProvider serviceProvider,
                                      string projectDirectory,
                                      string packagesDirectory,
                                      string configuration,
                                      FrameworkName targetFramework,
                                      ICache cache,
                                      ICacheContextAccessor cacheContextAccessor,
                                      INamedCacheDependencyProvider namedCacheDependencyProvider,
                                      IAssemblyLoadContextFactory loadContextFactory = null)
        {
            ProjectDirectory           = projectDirectory;
            Configuration              = configuration;
            RootDirectory              = Runtime.ProjectResolver.ResolveRootDirectory(ProjectDirectory);
            ProjectResolver            = new ProjectResolver(ProjectDirectory, RootDirectory);
            FrameworkReferenceResolver = new FrameworkReferenceResolver();
            _serviceProvider           = new ServiceProvider(serviceProvider);

            PackagesDirectory = packagesDirectory ?? NuGetDependencyResolver.ResolveRepositoryPath(RootDirectory);

            var referenceAssemblyDependencyResolver = new ReferenceAssemblyDependencyResolver(FrameworkReferenceResolver);

            NuGetDependencyProvider = new NuGetDependencyResolver(PackagesDirectory, RootDirectory);
            var gacDependencyResolver = new GacDependencyResolver();

            ProjectDepencyProvider = new ProjectReferenceDependencyProvider(ProjectResolver);
            var unresolvedDependencyProvider = new UnresolvedDependencyProvider();

            DependencyWalker = new DependencyWalker(new IDependencyProvider[] {
                ProjectDepencyProvider,
                NuGetDependencyProvider,
                referenceAssemblyDependencyResolver,
                gacDependencyResolver,
                unresolvedDependencyProvider
            });

            LibraryExportProvider = new CompositeLibraryExportProvider(new ILibraryExportProvider[] {
                new ProjectLibraryExportProvider(ProjectResolver, ServiceProvider),
                referenceAssemblyDependencyResolver,
                gacDependencyResolver,
                NuGetDependencyProvider
            });

            LibraryManager = new LibraryManager(targetFramework, configuration, DependencyWalker,
                                                LibraryExportProvider, cache);

            AssemblyLoadContextFactory   = loadContextFactory ?? new RuntimeLoadContextFactory(ServiceProvider);
            namedCacheDependencyProvider = namedCacheDependencyProvider ?? NamedCacheDependencyProvider.Empty;

            // Default services
            _serviceProvider.Add(typeof(IApplicationEnvironment), new ApplicationEnvironment(Project, targetFramework, configuration));
            _serviceProvider.Add(typeof(IFileWatcher), NoopWatcher.Instance);
            _serviceProvider.Add(typeof(ILibraryManager), LibraryManager);

            // Not exposed to the application layer
            _serviceProvider.Add(typeof(ILibraryExportProvider), LibraryExportProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(IProjectResolver), ProjectResolver, includeInManifest: false);
            _serviceProvider.Add(typeof(NuGetDependencyResolver), NuGetDependencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(ProjectReferenceDependencyProvider), ProjectDepencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(ICache), cache, includeInManifest: false);
            _serviceProvider.Add(typeof(ICacheContextAccessor), cacheContextAccessor, includeInManifest: false);
            _serviceProvider.Add(typeof(INamedCacheDependencyProvider), namedCacheDependencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(IAssemblyLoadContextFactory), AssemblyLoadContextFactory, includeInManifest: false);

            var compilerOptionsProvider = new CompilerOptionsProvider(ProjectResolver);

            _serviceProvider.Add(typeof(ICompilerOptionsProvider), compilerOptionsProvider);
        }
Ejemplo n.º 23
0
        public ProjectHostContext(IServiceProvider serviceProvider,
                                  string projectDirectory,
                                  string packagesDirectory,
                                  string[] sourcePaths,
                                  string configuration,
                                  FrameworkName targetFramework,
                                  ICache cache,
                                  ICacheContextAccessor cacheContextAccessor,
                                  INamedCacheDependencyProvider namedCacheDependencyProvider,
                                  IAssemblyLoadContextFactory loadContextFactory = null)
        {
            ProjectDirectory           = projectDirectory;
            Configuration              = configuration;
            RootDirectory              = Microsoft.Framework.Runtime.ProjectResolver.ResolveRootDirectory(ProjectDirectory);
            ProjectResolver            = new ProjectResolver(ProjectDirectory, RootDirectory, sourcePaths);
            FrameworkReferenceResolver = new FrameworkReferenceResolver();
            _serviceProvider           = new ServiceProvider(serviceProvider);

            PackagesDirectory = packagesDirectory ?? NuGetDependencyResolver.ResolveRepositoryPath(RootDirectory);

            var referenceAssemblyDependencyResolver = new ReferenceAssemblyDependencyResolver(FrameworkReferenceResolver);

            NuGetDependencyProvider = new NuGetDependencyResolver(PackagesDirectory, RootDirectory);
            var gacDependencyResolver = new GacDependencyResolver();

            ProjectDepencyProvider = new ProjectReferenceDependencyProvider(ProjectResolver);
            var unresolvedDependencyProvider = new UnresolvedDependencyProvider();

            DependencyWalker = new DependencyWalker(new IDependencyProvider[] {
                ProjectDepencyProvider,
                NuGetDependencyProvider,
                referenceAssemblyDependencyResolver,
                gacDependencyResolver,
                unresolvedDependencyProvider
            });

            LibraryExportProvider = new CompositeLibraryExportProvider(new ILibraryExportProvider[] {
                new ProjectLibraryExportProvider(ProjectResolver, ServiceProvider),
                referenceAssemblyDependencyResolver,
                gacDependencyResolver,
                NuGetDependencyProvider
            });

            LibraryManager = new LibraryManager(targetFramework, configuration, DependencyWalker,
                                                LibraryExportProvider, cache);

            AssemblyLoadContextFactory = loadContextFactory ?? new AssemblyLoadContextFactory(ServiceProvider);

            var sourceCodeService = new SourceTextService(cache);

            var provider = new RoslynProjectReferenceProvider(cache, cacheContextAccessor, namedCacheDependencyProvider, loadContextFactory, _serviceProvider.GetService <IFileWatcher>(), _serviceProvider);

            // Default services
            _serviceProvider.Add(typeof(IApplicationEnvironment), new ApplicationEnvironment(Project, targetFramework, configuration));
            _serviceProvider.Add(typeof(ILibraryExportProvider), LibraryExportProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(IProjectResolver), ProjectResolver);
            _serviceProvider.Add(typeof(IFileWatcher), NoopWatcher.Instance);

            _serviceProvider.Add(typeof(NuGetDependencyResolver), NuGetDependencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(ProjectReferenceDependencyProvider), ProjectDepencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(ILibraryManager), LibraryManager);
            _serviceProvider.Add(typeof(ICache), cache);
            _serviceProvider.Add(typeof(ICacheContextAccessor), cacheContextAccessor);
            _serviceProvider.Add(typeof(INamedCacheDependencyProvider), namedCacheDependencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(IAssemblyLoadContextFactory), AssemblyLoadContextFactory);

            _serviceProvider.Add(typeof(IProjectReferenceProvider), provider);
            _serviceProvider.Add(typeof(ISourceTextService), sourceCodeService);
        }
Ejemplo n.º 24
0
 public CompilationCache()
 {
     CacheContextAccessor = new CacheContextAccessor();
     Cache = new Cache(CacheContextAccessor);
     NamedCacheDependencyProvider = new NamedCacheDependencyProvider();
 }
Ejemplo n.º 25
0
 public CompilationCache()
 {
     CacheContextAccessor = new CacheContextAccessor();
     Cache = new Cache(CacheContextAccessor);
     NamedCacheDependencyProvider = new NamedCacheDependencyProvider();
 }
Ejemplo n.º 26
0
        public ApplicationHostContext(IServiceProvider serviceProvider,
                                      string projectDirectory,
                                      string packagesDirectory,
                                      string configuration,
                                      FrameworkName targetFramework,
                                      ICache cache,
                                      ICacheContextAccessor cacheContextAccessor,
                                      INamedCacheDependencyProvider namedCacheDependencyProvider,
                                      IAssemblyLoadContextFactory loadContextFactory = null,
                                      bool skipLockFileValidation = false)
        {
            ProjectDirectory           = projectDirectory;
            Configuration              = configuration;
            RootDirectory              = Runtime.ProjectResolver.ResolveRootDirectory(ProjectDirectory);
            ProjectResolver            = new ProjectResolver(ProjectDirectory, RootDirectory);
            FrameworkReferenceResolver = new FrameworkReferenceResolver();
            _serviceProvider           = new ServiceProvider(serviceProvider);

            PackagesDirectory = packagesDirectory ?? NuGetDependencyResolver.ResolveRepositoryPath(RootDirectory);

            var referenceAssemblyDependencyResolver = new ReferenceAssemblyDependencyResolver(FrameworkReferenceResolver);

            NuGetDependencyProvider = new NuGetDependencyResolver(new PackageRepository(PackagesDirectory));
            var gacDependencyResolver = new GacDependencyResolver();

            ProjectDepencyProvider = new ProjectReferenceDependencyProvider(ProjectResolver);
            var unresolvedDependencyProvider = new UnresolvedDependencyProvider();

            var projectName = PathUtility.GetDirectoryName(ProjectDirectory);

            Project project;

            if (ProjectResolver.TryResolveProject(projectName, out project))
            {
                Project = project;
            }
            else
            {
                throw new InvalidOperationException(
                          string.Format("Unable to resolve project '{0}' from {1}", projectName, ProjectDirectory));
            }

            var projectLockJsonPath = Path.Combine(ProjectDirectory, LockFileReader.LockFileName);
            var lockFileExists      = File.Exists(projectLockJsonPath);
            var validLockFile       = false;

            if (lockFileExists)
            {
                var lockFileReader = new LockFileReader();
                var lockFile       = lockFileReader.Read(projectLockJsonPath);
                validLockFile = lockFile.IsValidForProject(Project);

                if (validLockFile || skipLockFileValidation)
                {
                    NuGetDependencyProvider.ApplyLockFile(lockFile);

                    DependencyWalker = new DependencyWalker(new IDependencyProvider[] {
                        ProjectDepencyProvider,
                        NuGetDependencyProvider,
                        referenceAssemblyDependencyResolver,
                        gacDependencyResolver,
                        unresolvedDependencyProvider
                    });
                }
            }

            if ((!validLockFile && !skipLockFileValidation) || !lockFileExists)
            {
                // We don't add NuGetDependencyProvider to DependencyWalker
                // It will leave all NuGet packages unresolved and give error message asking users to run "dnu restore"
                DependencyWalker = new DependencyWalker(new IDependencyProvider[] {
                    ProjectDepencyProvider,
                    referenceAssemblyDependencyResolver,
                    gacDependencyResolver,
                    unresolvedDependencyProvider
                });
            }

            LibraryExportProvider = new CompositeLibraryExportProvider(new ILibraryExportProvider[] {
                new ProjectLibraryExportProvider(ProjectResolver, ServiceProvider),
                referenceAssemblyDependencyResolver,
                gacDependencyResolver,
                NuGetDependencyProvider
            });

            LibraryManager = new LibraryManager(targetFramework, configuration, DependencyWalker,
                                                LibraryExportProvider, cache);

            AssemblyLoadContextFactory   = loadContextFactory ?? new RuntimeLoadContextFactory(ServiceProvider);
            namedCacheDependencyProvider = namedCacheDependencyProvider ?? NamedCacheDependencyProvider.Empty;

            // Default services
            _serviceProvider.Add(typeof(IApplicationEnvironment), new ApplicationEnvironment(Project, targetFramework, configuration));
            _serviceProvider.Add(typeof(ILibraryManager), LibraryManager);
            _serviceProvider.TryAdd(typeof(IFileWatcher), NoopWatcher.Instance);

            // Not exposed to the application layer
            _serviceProvider.Add(typeof(ILibraryExportProvider), LibraryExportProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(IProjectResolver), ProjectResolver, includeInManifest: false);
            _serviceProvider.Add(typeof(NuGetDependencyResolver), NuGetDependencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(ProjectReferenceDependencyProvider), ProjectDepencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(ICache), cache, includeInManifest: false);
            _serviceProvider.Add(typeof(ICacheContextAccessor), cacheContextAccessor, includeInManifest: false);
            _serviceProvider.Add(typeof(INamedCacheDependencyProvider), namedCacheDependencyProvider, includeInManifest: false);
            _serviceProvider.Add(typeof(IAssemblyLoadContextFactory), AssemblyLoadContextFactory, includeInManifest: false);

            var compilerOptionsProvider = new CompilerOptionsProvider(ProjectResolver);

            _serviceProvider.Add(typeof(ICompilerOptionsProvider), compilerOptionsProvider);
        }