Question

I am trying to follow this article. There is a step which says you need to install XSockets.Sample.WebRTC via package manager console(PMC), this is where I got stuck.
I have been getting an error which says File contains corrupted data, shown as below -

enter image description here

I went through this post but none of the solutions worked for me. I could not find any solution to my problem. What am I doing wrong? How do I make it work?

Another question is, in the article that I am following, there is this picture which shows - enter image description here

but I got nothing like LocalNuget in my package source. I got only two options - check the above image.

Why is this difference? Is there anything wrong with my visual studio installation?

Was it helpful?

Solution

The problem was with Nuget Package Manager Console.If anyone comes across this problem, then try and update the Nuget Package Manager version, worked in my case.

To update Nuget Package Manager click on Tools -> Extensions and Updates -> Updates
 -> Visual Studio Gallery -> Nuget Package Manager.

OTHER TIPS

I updated Nuget Package Manager version to 2.8 (latest till date) but same issues.

Finally, referring to solutions at http://nuget.codeplex.com/discussions/272453 I got the problem resolved.

By clearing package cache and disabling antivirus temporarily installation of XSockets.Sample.WebRTC via package manager console(PMC) was successful for me.

Try this:

Right click in the project -> Unload project Then, right click in the .csproj and edit. Look for Xsockets.Sample.WebRTC (maybe is not there)

If it is there, remove it, and reinstall again after Load again the project ;)

I had a similar issue after using powershell to do a solution wide string replace. I wasn't careful to exclude .exe files from the command, and it altered the nuget.exe file in the .nuget folder. Upgrading Nuget Package Manager did not help, but replacing the nuget.exe with a version from another solution did.

An easy way to tell if this is your issue, is to run the suspect nuget.exe with a right-click, run as administrator and if it gives you an error that it's not compatible with your version of windows, than you know its busted.

i had the same error after recovering a solution the was deleted by mistake, solved the problem as following. I closed visual studio then removed all packages from packages folder, when i opened the solution again the error message isn't there and VS asked me to restore missing packages, after restoring packages every thing is working fine :)

I recently got this out of the blue.

I needed to update to Package Manager console Version 2.8.60723.765.

Starting it displayed:

========================
NuGet Enable Package Restore Fix
========================
To fix package restore:
1. Please enable package restore in Visual Studio FIRST.
2. Run the command: Install-NuGetEnablePackageRestoreFix 
3. Restart Visual Studio.

This should fix that pesky broken build you are experiencing.

Running

Install-NuGetEnablePackageRestoreFix

and Rebuilding fixed it for me.

During a package restore, my PC lost power. I also had the issue with nuget package manager:

File contains corrupted data

When I opened the Package Manager Console, I got this message:

Unable to read package from path 'Microsoft.OData.Core.6.15.0\Microsoft.OData.Core.6.15.0.nupkg'.

I solved it by simply deleting that package from the disk and when I opened package manager, the original error message was gone and I was able to restore the package I had deleted.

In my case, the Nuget Package Manager extension was already the latest version & also clearing up local cache didn't help either.

However, when I cleared the packages folder & rebuilt the solution - it fixed the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top