Nuget Package Manager for single project fails to load after adding RingCentralSDK - nuget

I'm on VS 2015, targeting .net 4.5.2, my "Nuget Package Manager for Visual Studio" in Extensions and Updates shows 3.4.4.1321.
I added all dependencies of RingCentralSDK package separately:
Microsoft.Bcl
Microsoft.Bcl.Async
Microsoft.Bcl.Build
Microsoft.Net.Http
Newtonsoft.Json
Portable.BouncyCastle-Signed
PubnubPCL
Then I right click on my project, pick "Manage Nuget Packages...", the tab opens, in the "Installed" subtab I can see the 7 packages.
Now, I install the RingCentralSDK package. My output is fine:
Attempting to gather dependency information for package 'RingCentralSDK.1.0.0' with respect to project 'MyProj', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'RingCentralSDK.1.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'RingCentralSDK.1.0.0'
Resolved actions to install package 'RingCentralSDK.1.0.0'
Adding package 'RingCentralSDK.1.0.0' to folder 'C:\code\packages'
Added package 'RingCentralSDK.1.0.0' to folder 'C:\code\packages'
Added package 'RingCentralSDK.1.0.0' to 'packages.config'
Successfully installed 'RingCentralSDK 1.0.0' to MyProj
========== Finished ==========
Now, I check again the Manage Nuget Packages for this specific project, and instead of seeing the list of packages, I get a yellow band:
Error occured Show erros in output Dismiss
And in the "Package Manager" output, the error is:
ZIP archive contains unsupported data structures.
In my packages folder, the folder "RingCentralSDK.1.0.0" seems ok, but then I don't anything about nuget packages format.
I cannot uninstall RingCentral via the package manager as it's not showing, not any other one, which is really annoying. I had an error when trying to do it via the command line. I reverted my changes (or remove the line in packages.config for my project), and the Nuget Package Manager tab works fine again. This is also affecting the "Managet Nuget Packages for Solution".
What can I do to fix this?

Fixed in RingCentralSDK 1.0.1-alpha1
It turns out that the NuGet package created on Mac is not compatible with Visual Studio NuGet GUI tool.
You can install the latest version by
Install-Package RingCentralSDK -Pre
Or if you prefer GUI:
Update:
For projects which already have 1.0.0 version installed, how to upgrade?
Today I did some testing and I came to the following conclusion:
New project will have no problem with 1.0.1 version or later
For old project which have 1.0.0 installed. You need to follow the following steps:
UnInstall RingCentralSDK 1.0.0
Close VS
Delete packages folder in your project
Delete packages folder in ~/.nuget/
Launch VS
Install RingCentralSDK 1.0.1
I need to do the above because nuget has cache. If I don't do it the problem just persists. I don't know the exactly reason but the above steps did work for me.

Related

Failed to update nuget Package

I tried to run Update-Package -reinstall Owin
I'm getting the below output for a failed installation.
Package 'Owin.1.0.0' already exists in folder 'G:\gitlab\CompanyWebsite\packages'
Install failed. Rolling back...
Package 'Owin 1.0.0' does not exist in project 'CompanyWebsite
Package 'Owin 1.0' already exists in folder 'G:\gitlab\CompanyWebsite\packages'
Executing nuget actions took 1.04 sec
What could be the problem?
Notice the version "1.0.0" vs the "1.0" by any chance the package developer reset their numbering format?
I managed to install the package by
Delete the package in the /packages/Owin1.0 folder
Make sure Owin is not listed in package.config
Run command - Install-Package Owin
But why reinstall does not work at the first place. Trying to learn to better understand here.

Installing Nuget Gets Dependencies Only

I have a .NET Framework 4.5 project. I'm trying to install Microsoft.NET.Test.Sdk. This should be possible as per https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/
I ran the following command, but get the dependencies only. I tried installing via the Nuget Package Manager too. Finally... I see the package inside my packages.config file, but don't see it in my references. Any suggestions?
Install-Package Microsoft.NET.Test.Sdk -Version 15.7.0
I ended up using Microsoft.VisualStudio.TestTools.UnitTesting.

Error When Installing NuGet Packages

When I try to install EF with NuGet in Visual Studio 2013 Pro, I get this error:
Attempting to resolve dependency 'EntityFramework.Commands (≥ 7.0.0-beta4)'.
'EntityFramework.Commands' already has a dependency defined for 'EntityFramework.Relational'.
When I try to install EntityFramework.Core I get this erro:
Attempting to resolve dependency 'Ix-Async (≥ 1.2.3)'.
'EntityFramework.Core' already has a dependency defined for 'Ix-Async'.
What could possibly be the problem, I've seen others with the issue, they suggested installing an upgraded NuGet, which I did. The problem persists. No other solutions have worked.
Any one have any ideas how I can fix this? It's a VSTO addin for Outlook 2013.
Thanks
EDIT:
After restarting VS2013 after updating NuGet I tried to install EF again, got a new error:
Attempting to resolve dependency 'EntityFramework.Commands (≥ 7.0.0-beta4)'.
Installing 'EntityFramework.Commands 7.0.0-beta4'.
Successfully installed 'EntityFramework.Commands 7.0.0-beta4'.
Executing script file 'C:\Users\shenk\Documents\Visual Studio 2013\Projects\Archiver\packages\EntityFramework.Commands.7.0.0-beta4\tools\init.ps1'.
Installing 'EntityFramework 7.0.0-beta4'.
Successfully installed 'EntityFramework 7.0.0-beta4'.
Adding 'EntityFramework.Commands 7.0.0-beta4' to Archiver.
Uninstalling 'EntityFramework.Commands 7.0.0-beta4'.
Successfully uninstalled 'EntityFramework.Commands 7.0.0-beta4'.
Install failed. Rolling back...
Could not install package 'EntityFramework.Commands 7.0.0-beta4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
However when I try to install EntityFramework.Core again, it succeeds now.
I want to use EF6, but cannot find it on NuGet, and when I try to install it with the Microsoft Download Center, it never downloads.
I'm a bit lost here so any help would be appreciated.
Upgrade NuGet to the latest version from here:
https://nuget.codeplex.com/releases/view/612846
Update:
NuGet at codeplex has been moved to https://github.com/nuget/home
Simply download latest version from:
https://www.nuget.org/downloads
The solution I found was to use IE to download things from Microsoft Download center. I was able to install EF tools for VS2012 and VS2013.
Next to install EF6 I went to Tools -> NuGet Package Manager -> Package Manager Console. In the console I entered Install-Package EntityFramework You can also do Install-Package EntityFramework -pre to get the latest release (7.0.0-beta4)
This worked for me. Unless someone else has a better solution I will accept this one in a day or so.

Nuget not reinstalling packages

I have modified the target .net framework to use 4.5 from 4.0. I got a message from nuget that packages need to re-installed so ran Update-Package -Reinstall -ProjectName https://localhost/SomeWebProject/. As nuget was executing, it spitted out yellow warning signs that looked like this:
Skipped reinstalling package 'NLog 3.1.0.0' in project 'SomeWebProject' because the package does not exist in the package source.
Why aren't my packages being reinstalled? I went into my packages folder and verified NLog 3.1.0.0 exist!
Turns out the solution is hiding in plain sight.
All we have to do is set the Package Source in the Package Manager Console window. (Credits to Matt Ward for pointing it out.)
Or you may run the following NuGet Package Management command:
'Update-Package -reinstall'
This command will reinstall all your solutions NuGet packages without updating the version(s) of existing packages.

nuget local package source is unable to find package

I'm trying to build some packages for use within my company. I've set up a local folder on my hard drive and added it as a package source before the official nuget source. when I execute nuget list janney, my packages are found however executing install-package janney.myfirstpackage throws an error Install-Package : Unable to find package 'Janney.MyFirstPackage'.
What am I doing wrong? Is this an indication that I've messed up my packages?
In my package manager console my package source was set to nuget rather than all