I have an SSDT project and I open the Package Manager Console to use nuget to get a dacpac (in the repo already) and I get these errors:
PM> get-Package -ListAvailable -AllVersions -IncludePrerelease
get-Package : Project 'Default' is not found.
At line:1 char:1
+ get-Package -ListAvailable -AllVersions -IncludePrerelease
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Default:String) [Get-Package], ItemNotFoundException
+ FullyQualifiedErrorId : NuGetProjectNotFound,NuGet.PackageManagement.PowerShellCmdlets.GetPackageCommand
I do not have a project called "default" (the projects are named after the databases they contain) and I cannot see a way to mark a project as Default. OTOH I can and do have a project marked as the startup project.
What is causing this error message and how can I solve it?
This is a current limitation within Visual Studio SSDT projects. I opened a ticket in the Visual Studio Feedback Forum with the name
VS 2019 Manage NuGet Packages should support Database project
VS 2019 Manage NuGet Packages should support Database project
Related
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
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
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.
I am attempting to compile the Caliburn.Micro projects from GitHub so I can generate the DLL's to use in my own project - a Caliburn.Micro Xamarin Native Android project.
I have loaded the Caliburn.Micro.sln (located in the src folder) into Visual Studio 2012 professional and attempted to build the Caliburn.Micro project. I get 40 errors relating to metadata. For example;
Error 5 Metadata file '_Tests\Caliburn.Micro-xamarin\Caliburn.Micro-xamarin\bin\net45\Debug\Caliburn.Micro.Platform.dll' could not be found _Tests\Caliburn.Micro-xamarin\Caliburn.Micro-xamarin\src\Caliburn.Micro.Tests.NET45\CSC Caliburn.Micro.Tests.NET45
So I have attempted to install the Caliburn.Micro NuGet package on this project and I get the following errors. I have also created my own new solution and attempted to install the Caliburn.Micro NuGet package and the same error occurs.
Any ideas what is going wrong?
PM> Install-Package Caliburn.Micro
Attempting to resolve dependency 'Caliburn.Micro.Core (= 2.0.2)'.
Installing 'Caliburn.Micro.Core 2.0.2'.
Successfully installed 'Caliburn.Micro.Core 2.0.2'.
Installing 'Caliburn.Micro 2.0.2'.
Successfully installed 'Caliburn.Micro 2.0.2'.
Adding 'Caliburn.Micro.Core 2.0.2' to Caliburn.Micro.
Uninstalling 'Caliburn.Micro.Core 2.0.2'.
Successfully uninstalled 'Caliburn.Micro.Core 2.0.2'.
Install failed. Rolling back...
Install-Package : Specified argument was out of the range of valid values.
Parameter name: supportedFrameworks
At line:1 char:1
+ Install-Package Caliburn.Micro
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], ArgumentOutOfRangeException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
The ArgumentOutOfRangeException with the argument name being supportedFrameworks usually means there is something wrong with one or more of your Portable Class Library (PCL) profiles.
NuGet looks at the .xml files in various PCL directories, for example:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259\SupportedFrameworks
If for some reason NuGet does not find any non-Xamarin profile xml files in one of these directories it will throw an ArgumentOutOfRangeException. The SupportedFrameworks directory will either be empty or may just have Xamarin .xml files in there, both of these problems will cause the ArgumentOutOfRangeException.
To find which PCL profile has missing .xml files you can either look at every PCL profile directory or debug NuGet.
I usually use a console app that uses NuGet but you can easily debug, passing it the list command line argument which will trigger the same code path as NuGet version 2. If you then put a breakpoint on the line of code that throws the ArgumentOutOfRangeException you should be able to see which PCL profile is causing a problem.
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.