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.
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 its paket.references.
Execute paket install.
packages.config contains:<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" />
</packages>
packages.config contains:<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="[6.2.0]" />
</packages>
But the packages.config is correct. Isn't it?
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?
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
This also breaks unit test integration (e.g. xunit.runner.visualstudio)
Do you folks have any updates on this? As far as I can tell and can verify locally, we just need to remove the square brackets from the version string in packages.config.
Yes, we would accept a fix. I can't do it myself right now, since I'm on
longer vacation.
ben-reilly notifications@github.com schrieb am Do., 14. Juni 2018, 01:07:
Do you folks have any updates on this? As far as I can tell and can verify
locally, we just need to remove the square brackets from the version string
in packages.config.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/3231#issuecomment-397115917,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNFNdzNR7tcZmUcwArj44-MB2IP0Pks5t8ZsTgaJpZM4UT0U6
.
See #3253.
@inosik That looks right to me. Thanks for putting it together.
For others, here's the reference: https://docs.microsoft.com/en-us/nuget/reference/package-versioning
It appears that although it's possible to specify ranges in project and .nuspec files, and even in the "allowedVersions" attribute in packages.config, only exact versions are permitted in the "version" attribute in packages.config. So being able to read ranges is fine for those other files, but we should only be writing exact versions to packages.config.
Most helpful comment
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