{"action":"opened","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/2100","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/2100/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/2100/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/2100/events","html_url":"https://github.com/NuGet/Home/issues/2100","id":132995381,"number":2100,"title":"Unable to resolve dependencies from aggregate repository.","user":{"login":"dazinator","id":3176632,"avatar_url":"https://avatars.githubusercontent.com/u/3176632?v=3","gravatar_id":"","url":"https://api.github.com/users/dazinator","html_url":"https://github.com/dazinator","followers_url":"https://api.github.com/users/dazinator/followers","following_url":"https://api.github.com/users/dazinator/following{/other_user}","gists_url":"https://api.github.com/users/dazinator/gists{/gist_id}","starred_url":"https://api.github.com/users/dazinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dazinator/subscriptions","organizations_url":"https://api.github.com/users/dazinator/orgs","repos_url":"https://api.github.com/users/dazinator/repos","events_url":"https://api.github.com/users/dazinator/events{/privacy}","received_events_url":"https://api.github.com/users/dazinator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-11T15:01:19Z","updated_at":"2016-02-11T15:01:19Z","closed_at":null,"body":"Hello,\r\n\r\nI am using the client tools (NuGet v3) within my web application, to install NuGet packages at runtime as a way of managing plugins for my application.\r\n\r\nAfter calling `NuGetPackageManager.InstallPackageAsync` - it completes successfully, and it updates my \"packages.xml` file, but the NuGet package is nowhere to be found.. It's like it doesn't get extracted.\r\n\r\nI am wondering if it's because I am using `EmptyNuGetProjectContext` ? and if so what should I be using?\r\n\r\nI am creating a `NuGetPackageManager` like so:\r\n\r\n```\r\n            string webRootPath = _env.WebRootPath; // points to my websites wwwroot folder which has a NuGet.config\r\n            NuGet.Configuration.ISettings settings = new NuGet.Configuration.Settings(webRootPath);\r\n            _packageSourceProvider = new NuGet.Configuration.PackageSourceProvider(settings);\r\n\r\n            // not sure what these do, but it was in the NuGet command line.\r\n            _resourceProviders = new List<Lazy<INuGetResourceProvider>>();            _resourceProviders.AddRange(NuGet.Protocol.Core.v2.FactoryExtensionsV2.GetCoreV2(Repository.Provider));            _resourceProviders.AddRange(NuGet.Protocol.Core.v3.FactoryExtensionsV2.GetCoreV3(Repository.Provider));\r\n\r\n            _sourceRepositoryProvider = new SourceRepositoryProvider(_packageSourceProvider, _resourceProviders);\r\n\r\n            _sourceRepositories = _sourceRepositoryProvider\r\n                .GetRepositories()\r\n                .Where(repo => repo.PackageSource.IsEnabled)\r\n                .ToList();\r\n\r\n            _packageManager = new NuGetPackageManager(_sourceRepositoryProvider, settings, _installFolder);\r\n\r\n```\r\n\r\nThen I am installing the package like so:\r\n\r\n```\r\n\r\n        public async void Install(string packageId, string version)\r\n        {\r\n\r\n       \r\n            var meta = new Dictionary<string, object>\r\n            {\r\n                { NuGetProjectMetadataKeys.Name, \"ModulesNuGetProject\" },\r\n                { NuGetProjectMetadataKeys.TargetFramework, NuGetFramework.Parse(\"net451\")}\r\n            };\r\n\r\n            var proj = new PackagesConfigNuGetProject(_installFolder, meta);\r\n\r\n            var resolutionContext = new ResolutionContext(DependencyBehavior.Ignore,\r\n                includePrelease: true,\r\n                includeUnlisted: true,\r\n                versionConstraints: VersionConstraints.None);\r\n\r\n            var nuGetVersion = new NuGetVersion(version);\r\n            var packageIdentity = new PackageIdentity(packageId, nuGetVersion);\r\n            //  var cx = new ProjectContext()\r\n            var projectContext = new EmptyNuGetProjectContext();\r\n\r\n            // var primaryRepositories = _sourceRepositories.Select(a=>_sourceRepositoryProvider.CreateRepository(a));\r\n\r\n            //  var sourceRepo = new SourceRepository();\r\n            await _packageManager.InstallPackageAsync(proj, packageIdentity, resolutionContext, projectContext, _sourceRepositories, Enumerable.Empty<SourceRepository>(), CancellationToken.None);\r\n            _shutdown.StopApplication(); // restrat our application so that the new module will be loaded.\r\n        }\r\n```\r\n\r\nAny hints much appreciated!\r\n\r\n\r\n"}}