New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot install some packages in VS15 Community on Win10 (Both command and GUI) #1470
Comments
Can you please update to NuGet 3.2 from the gallery? I don't see this issue reproducing on my machine. |
THX for the reply, it is 3.2 already. |
Not only above problem, here is another one. Attempting to gather dependencies information for package 'EntityFramework.6.1.3' with respect to project 'NugetTest', targeting '.NETFramework,Version=v4.0' |
Attached the error message when I run 'install-package System.Data.SQLite -dependencyversion highestminor' on above console application. Package Manager Console Host Version 3.2.0.10516 Type 'get-help NuGet' to see all available NuGet commands. PM> install-package System.Data.SQLite -dependencyversion highestminor
PM> |
Feel free to ask me for more details if those could help you. |
Can you share a fiddler trace? Are you able to make the http calls from another application (fiddler/browser?) Sent from my Windows Phone From: Hekumailto:notifications@github.com Feel free to ask me for more details if those could help you. — |
OK, will let you know once I come back from my hometown, I`ll have a 7 days holiday since tomorrow. |
Thanks for getting back with more details. Its hard to tell what is going on from a screenshot of the trace, but I am seeing a more serious issue: It looks like EntityFramework is trying to load package installer services and fails. That seems odd, because this is a pretty fundamental service that nuget provides to Visual Studio. I can see the same thing work fine on my machine, so I'm wondering if there is an issue with how your nuget extension is installed, or perhaps an issue with community version of visual studio. I'm not really sure why it fails on community version, I don't see it failing in any of my projects. Will need to setup a specific repro to look deeper into it. Lets deal with this issue, and after we resolve it we can look at your other concern. |
@zhili1208 can you please investigate this issue? I would suggest going down a few avenues
|
I set up a win10 32 bit machine with community VS 2014, nuget version 3.2. But can't repro the issue. checked the extension folder, both dlls are installed correctly. I think 'Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].' issue looks like a MEF problem there, maybe the vs or nuget extension is installed incorrectly, My suggestion is you can try to recovery the vs or reinstall it to see if you can fix the issue. Another issue reported here is nuget throws on NuGet.Protocol.Core.v3.DependencyInfo.Utils., @heku can you repro this one every time or just one time? |
Can we get a listing of the folder structure under extensions? C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions If we think the files are missing (or duplicated), this could be the issue From: Zhi Li [mailto:notifications@github.com] I set up a win10 32 bit machine with community VS 2014, nuget version 3.2. But can't repro the issue. checked the extension folder, both dlls are installed correctly. I think 'Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].' issue looks like a MEF problem there, maybe the vs or nuget extension is installed incorrectly, My suggestion is you can try to recovery the vs or reinstall it to see if you can fix the issue. Another issue reported here is nuget throws on NuGet.Protocol.Core.v3.DependencyInfo.Utils., @hekuhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fheku&data=01%7c01%7cyigalatz%40microsoft.com%7cd45bf017c7454f6e2f3108d2ce95ece4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Qoh%2bGDXdTwmCaxXMqmk%2b7cHE1sU%2bwcQbcRre5WyFv1Y%3d can you repro this one every time or just one time? — |
This was more of a question for @heku , please see if you either are missing dlls or have multiple folders with the same dll showing up twice. |
The NuGet.Protocol.Core.v3.DependencyInfo.Utils issue doesn`t repro now, but another NuGet.Protocol.Core.v3... issue is coming. Attempting to gather dependencies information for package 'System.Data.SQLite.1.0.98.1' with respect to project 'NugetTest', targeting '.NETFramework,Version=v4.0'
You cannot call a method on a null-valued expression.
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
You cannot call a method on a null-valued expression.
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
You cannot call a method on a null-valued expression.
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
You cannot call a method on a null-valued expression.
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
Type 'get-help EntityFramework' to see all available Entity Framework commands. |
@heku since I can't repro your issue, I have no idea why it fails. Can you repair your vs? it might fix the issue |
You probably want to have a clean uninstall and reinstall |
Well, I`ll have a try, thank you all the same. |
Hi, last night I re-installed a clean OS (windows 10 pro 32 English) and installed VS2015 community (English) and updated Nuget to the latest version. then try to install EntityFramework and System.Data.SQLite, the SQLite can install successfully but the EntityFramework still have the issue. At C:\Codes\NugetTest\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5 $packageInstallerServices = $componentModel.GetService([NuGet.Vis ...
CategoryInfo : InvalidOperation: (:) [], RuntimeException $toolsPath = Join-Path $installPath tools
|
It's still same issue. where do you download VS community version and can you provide the link? |
I have similar problem, but with Visual Studio Express 2015 for Windows Desktop. OS is Windows 10 x64. Interesting is that yesterday it worked after downgrade of Entity Framework, but today the same issue... The express edition (and also the community version) is available here: https://www.visualstudio.com/products/mt238358 |
it looks like everyone hit this when they install entityframework, you just said "downgrade of entityfremwork", what's the version of entityframework you installed and what's the version you downgrade to? thanks |
BTW, can you help me check this? Open your NuGet Packager Console, type " $test = Get-VSComponentModel", and check $test is not null, then type "$test1 = $test.GetService([NuGet.VisualStudio.IVsPackageInstallerServices])", then check $test2, it should be NuGet.VisualStudio.VsPackageInstallerServices |
@csabar Please first uninstall NuGet 3.0 and reinstall 3.2 |
I tired windows desktop express, it repro with 3.0 but when I uninstall and reinstall it, both 3.0 and 3.2 works well |
I tried different versions of entity framework, but only downgrade from 6.1.3 to 6.1.2 helped. And it worked just for one day... I tried reinstalling the NuGet few days ago. Now I have version 3.2.60914.10516. I'm not sure what you mean by reinstalling both 3.0 and 3.2. I think I have just the 3.2 version Here is the result of your commands:
|
looks like it's not related to entityframework and nuget verison(3.0 or 3.2), just for some reason, VS MEF didn't import the NuGet API type. I can't repro this now and trying to get repro first. |
Zhi – I agree with your assessment, in this world you can’t create new templates that require nuget, so things like file->new->mvc project should create an unbuildable project. Let’s verify that is the case with the user From: Zhi Li [mailto:notifications@github.com] looks like it's not related to entityframework and nuget verison(3.0 or 3.2), just for some reason, VS MEF didn't import the NuGet API type. I can't repro this now and trying to get repro first. — |
@csabar can you try this? file->new->mvc project. thanks |
I tried File -> New Project... and there between the installed there is no item like MVC Project. There is no such a project even between the Online items. Am I doing something wrong? If I understand correctly the MVC should be under the Web category, but this is Visual Studio Express, which I use just for WPF projects and not web projects. Is it possible to test with other type of project which should be there in Express Edition? |
No, it's not possible, sorry, I just forgot there is no mvc in desktop express edition, but anyway, I think mvc will not work in this case because I just found VS didn't load the Interface dll into memory. you can try to uninstall nuget and delete mef cache then reinstall NuGet extension. It's at %AppData%\Local\Microsoft\WDExpress\14.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache. it might work, at least it works for me. |
Thank you, deleting the cache file helped.
If you need the wrong cache file for reproducing I can send it by mail. |
Thx all, I tried above solution as well. But I found that it just works before I close the VS. when I re-open the VS, the issue repro again... |
Can you share the mef cache? Also please share the ActivityLog.xml file |
just did some test, I think when you deleted your mef cache, VS scanned all mef component and loaded all correct mef dlls into memory but generate wrong mef cache file on disk, so it was working before you closed VS. then you re-opened VS, Vs read wrong mef cache file, issue repro again. |
I can confirm that it works just temporarily. I can't upload the files here, because the file type is not supported, but I found that the last entry in the ActivityLog.xml is an error log about NuGet.
The date of the error is 2015/10/13, which is probably date when I started to use migrations in entity framework. And I think for the first time it worked and I was able to create the default migration. I think that the problem started to happen after restart of visual studio (if I remember correctly). |
How can you tell the error is about nuget? The text doesn't show that, is there more text above it? The callstack looks like a bug in an editor, which nuget does not ship. Could you please share more information? From: csabarmailto:notifications@github.com I can confirm that it works just temporarily. I can't upload the files here, because the file type is not supported, but I found that the last entry in the ActivityLog.xml is an error log about NuGet. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. The date of the error is 2015/10/13, which is probably date when I started to use migrations in entity framework. And I think for the first time it worked and I was able to create the default migration. I think that the problem started to happen after restart of visual studio (if I remember correctly). — |
Sorry, I just realized this is NuGet (reminder to self, stop reviewing callstacks right out of bed :) ). Will take a look shortly |
I believe this was fixed today, when #555 was fixed. If this repros after 3.3 is released we should open a fresh bug, and take another look. |
From @heku on September 27, 2015 2:53
PM> install-package System.Data.SQLite -dependencyversion highestminor
Attempting to gather dependencies information for package 'System.Data.SQLite.1.0.98.1' with respect to project 'OralEval.Infrastructure.Repositories', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'System.Data.SQLite.1.0.98.1' with DependencyBehavior 'HighestMinor'
Resolving actions to install package 'System.Data.SQLite.1.0.98.1'
Resolved actions to install package 'System.Data.SQLite.1.0.98.1'
Adding package 'EntityFramework.6.1.3' to folder 'C:\Codes\OralEval\packages'
Added package 'EntityFramework.6.1.3' to folder 'C:\Codes\OralEval\packages'
'App.config' already exists. Skipping...
Added package 'EntityFramework.6.1.3' to 'packages.config'
Executing script file 'C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\init.ps1'
Executing script file 'C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\install.ps1'
Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5
You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:74
You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:810 char:20
Unable to find type [NuGet.VisualStudio.IVsPackageInstallerServices].
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1004 char:5
You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:1006 char:5
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:740 char:28
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:74
You cannot call a method on a null-valued expression.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Codes\OralEval\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:810 char:20
Type 'get-help EntityFramework' to see all available Entity Framework commands.
Successfully installed 'EntityFramework 6.1.3' to OralEval.Infrastructure.Repositories
Install failed. Rolling back...
Package 'System.Data.SQLite.Core 1.0.98.1' does not exist in project 'OralEval.Infrastructure.Repositories'
Removed package 'EntityFramework 6.1.3' from 'packages.config'
Package 'System.Data.SQLite.Core 1.0.98.1' does not exist in folder 'C:\Codes\OralEval\packages'
Removing package 'EntityFramework 6.1.3' from folder 'C:\Codes\OralEval\packages'
Removed package 'EntityFramework 6.1.3' from folder 'C:\Codes\OralEval\packages'
install-package : Object reference not set to an instance of an object.
At line:1 char:1
Copied from original issue: NuGet/NuGetGallery#2703
The text was updated successfully, but these errors were encountered: