示例#1
0
        private static AssemblyLoader CreateLoader(string projectDir)
        {
            var globalAssemblyCache = new DefaultGlobalAssemblyCache();

            var loader = new AssemblyLoader();
            string rootDirectory = ResolveRootDirectory(projectDir);
            var resolver = new FrameworkReferenceResolver(globalAssemblyCache);
            var resourceProvider = new ResxResourceProvider();
            var roslynLoader = new RoslynAssemblyLoader(rootDirectory, NoopWatcher.Instance, resolver, globalAssemblyCache, loader, resourceProvider);
            loader.Add(roslynLoader);
            #if DESKTOP
            loader.Add(new MSBuildProjectAssemblyLoader(rootDirectory, NoopWatcher.Instance));
            #endif
            loader.Add(new NuGetAssemblyLoader(projectDir));

            return loader;
        }