question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS's Package Management Console is broken

See original GitHub issue

Description

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

  1. 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
  1. Create a classic .csproj and put EntityFramework to its paket.references.

  2. Execute paket install.

Expected behavior

  1. The created packages.config contains:
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="EntityFramework" version="6.2.0" />
</packages>
  1. The Package Management Console window can be opened, no errors are shown.

Actual behavior

  1. The created packages.config contains:
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="EntityFramework" version="[6.2.0]" />
</packages>
  1. An error is displayed after opening the Package Management Console window.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
enricosadacommented, Jun 6, 2018

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 that

2reactions
matthidcommented, May 31, 2018

I 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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found