Nuget update-package error with Microsoft.ApplicationInsights.JavaScript - azure

Wether I start a new project and add Azure Application Insights or add Insights to an existing project, it seems to break my Nuget updates.
Attempting to resolve dependencies for multiple packages
update-package : Unable to find package 'Microsoft.ApplicationInsights.JavaScript'. Existing packages must be restored before
performing an install or update.
At line:1 char:1
+ update-package
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
I can no longer just type 'update-package' to update all my packages.
Using VS2015
How do I fix this?

Do you have the "Include Prerelease" option checked in the NuGet package manager (or specify -IncludePrerelease in the Update-Package command in the Package Manager Console)?
I believe the JavaScript package is only pre-release at this moment.

Related

Can't install umbraco using nuget "operation failed"

i'am new use umbraco cms after i try to install using nuget in visual studio 2012 i get this error
From nuget package
'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp'.
and this from nuget console
Install-Package : 'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp'.
At line:1 char:1
+ Install-Package UmbracoCms
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
how to solve this
I had this yesterday. You need to make sure your NuGet manager in Visual Studio is the latest version. On older versions, you'll get that error. Upgrading the NuGet manager fixed the error for me. See here for some more info: http://issues.umbraco.org/issue/U4-9848

'Microsoft.Rest.ClientRuntime' already has a dependency defined for 'Newtonsoft.Json'

Attempting to install a package via Nuget into VS2012 and am encountering the following error.
PM> install-package microsoft.rest.clientruntime
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.8)'.
Install-Package : 'Microsoft.Rest.ClientRuntime' already has a dependency defined for 'Newtonsoft.Json'.
At line:1 char:16
+ install-package <<<< microsoft.rest.clientruntime
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
This issue is referenced in many locations, including here, but without exception the recommendation is to update to the latest version of Nuget.
I am running the latest version and have not been able to resolve this.
Nuget Version: 2.8.60318.667
I also tried to create a brand new solution and install the same package with the same results so it definitely is related to Nuget and not the project.
The problem is that the version of NuGet you are using is too old. You need at least NuGet version 2.12.
Visual Studio 2012 does not support NuGet 2.12 which is required by the latest Microsoft.Rest.ClientRuntime since it has dependency groups that target .NETStandard which are unknown by older versions of NuGet and result in the already has a dependency defined for error.
So you would need to upgrade your Visual Studio version, or try using an older version of the Microsoft.Rest.ClientRuntime NuGet package, or not use NuGet and download the Microsoft.Rest.ClientRuntime NuGet package directly from nuget.org and extract the required assemblies.
I had this issue recently when creating a private nuget feed within Visual Studio Team Services.
It turns out that after removing a Nuget package it hadn't updated the packages.config correctly and there was an orphaned reference which wasn't part of the .csproj file.
Removing the reference did the trick!
I had this problem using a NGet Package step in VSTS and creating the PowerShell step at this link fixed it:
https://github.com/Microsoft/vsts-tasks/issues/3756#issuecomment-288185011

Open Nuget Pkg on Local Disk

I'm trying to open NuGet packages of code used with the book Pro ASP MVC 5. As I need to work offline at times, I downloaded the packages to my PC disk. How can I open these packages in VS2013. I've tried to use the Package Manager Console -> Install-Package C:\ Wrox.ProMvc5.Views.AlbumList.1.0.0.0.nupkg (I move the package to the root of C:) Also tried enclosing string in quotes
I get this error:
install-package : Unable to find package 'C:\Wrox.ProMvc5.Views.AlbumList.1.0.0.0.nupkg'.
At line:1 char:2
+ install-package C:\Wrox.ProMvc5.Views.AlbumList.1.0.0.0.nupkg
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId :
NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
In case anyone else is interested: you have to go to the NuGet package manager "settings" and add a new "Package Sources". I.E. "C:\myNuGetFolder". Then back in the manager, you'll see this listed and by selecting it you'll see the packages for this book if you've placed them in that folder.

Unable to find package 'WPtoolkit'

I want to install the Windows Phone Toolkit, following instructions from the Codeplex, but I keep getting the following error message in the Package Manager Console:
Install-Package : Unable to find package 'WPtoolkit'.
At line:1 char:1
+ Install-Package WPtoolkit
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I also tried to look in "Manage NuGet Packages" and I couldn't find the Toolkit in the online tab there either.
Context: I've tried in VS2012 and VS2013, tried building as a WP8 and WP8.1 app.
I need this Toolkit because of the view components in there like the ListPicker and LongListMultiSelector.
Thanks in advance.
See if you have any updates available for Nuget Package Manager in the Notifications in the Notifications panel. If so try updating the package manager and try to re install WPToolkit.
I somehow managed to download the WPToolkit. I don't know which step fixed it but this is what I did:
Opened VS2013. Before opening any project, went to Tools > Extensions and Updates.
Under "Installed" tab I found the NuGet Package Manager for Visual Studio 2013, and uninstalled it.
Went to "Online" tab and installed it again.
Opened up my project.
Went to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
Searched in "Online" tab for "WPtoolkit" and found it!
I don't know if this helps anyone else but it may have been a bug in VS.

Google.Apis.Authentication 1.5.0-beta runtime error

while trying to create a windows phone app.
i want to use google calendar, and i just cant find out the way to install the framework.
am following the google example right in this link:
https://developers.google.com/google-apps/calendar/setup
i used the package manager console with the follow command
PM> Install-Package Google.Apis.Calendar.v3 -Pre
and runs all fine.
when i use this:
using Google.Apis.Authentication;
using Google.Apis.Authentication.OAuth2;
using Google.Apis.Calendar.v3;
using Google.Apis.Calendar.v3.Data;
i get a runtime error. on 0Auth2 that sais that the name space doesnt exit.
i try to use again the package manager console with the follow code:
PM> Install-Package Google.Apis.Authentication -Pre
and i get this message:
Install failed. Rolling back...
Install-Package : Could not install package 'Google.Apis.Authentication 1.5.0-beta'. You are trying to install this package into a project that targets
'Silverlight,Version=v4.0,Profile=WindowsPhone71', 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.
At line:1 char:1
+ Install-Package Google.Apis.Authentication -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Resources