VS's Package Management Console is broken
See original GitHub issueDescription
The changes introduced in commit 833b36c13 broke the Package Management Console in Visual Studio.
An error occurred while reading file 'D:\Work\PaketVersionTest\packages.config': Invalid package version for package id 'EntityFramework': '[6.2.0]'
The brackets syntax seems to be not supported by NuGet.
Repro steps
- Create
paket.dependencies
with the following content:
framework: net472
redirects: on
source https://api.nuget.org/v3/index.json
nuget EntityFramework ~> 6.2 version_in_path: true
-
Create a classic .csproj and put
EntityFramework
to itspaket.references
. -
Execute
paket install
.
Expected behavior
- The created
packages.config
contains:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" />
</packages>
- The Package Management Console window can be opened, no errors are shown.
Actual behavior
- The created
packages.config
contains:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="[6.2.0]" />
</packages>
- An error is displayed after opening the Package Management Console window.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Package Manager console not working
I was using Package Manager Console for installing a package and was getting this error. Strangely by using the Nuget Package Manager UI...
Read more >Package manager console not working
If I close VS again and open a solution with packages.config it appears to be working fine. When I open package manager console...
Read more >NuGet-Based Package Manager is missing - Visual Studio
This article describes a problem where NuGet-Based Microsoft Package Manager 1.5 or later isn't installed on a computer, and provides a ...
Read more >Manage NuGet packages with the Visual Studio ...
See how to work with NuGet packages by using PowerShell commands in the Visual Studio Package Manager Console.
Read more >Package Manager Console not working with path ...
Package Manager Console returned an error: Install-Package : Unable to find package 'vcpkg.F.vcpkg' at source 'F:/ cpkg/scripts/buildsystems'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i can repro too at work. after a
paket install
, the version is broken because[x.y.x]
is not supported by vs. i’ll fix thatI don’t think packages.config allows version ranges. packages.config always locks a particular version. I guess we have mixed parsing/serializing logic between multiple formats here?