Reputation: 19315
This is a general question but I will describe my specific scenario - My project is a .NET Core 3.0 SignalR Console application in VS19 (same with VS17)
After upgrading everything to Core 3.0 build now fails with:
Error CS1705 Assembly 'Microsoft.AspNetCore.SignalR.Client' with identity
'Microsoft.AspNetCore.SignalR.Client, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=adb9793829ddae60' uses 'Microsoft.AspNetCore.Http.Connections.Common,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version
than referenced assembly 'Microsoft.AspNetCore.Http.Connections.Common' with identity
'Microsoft.AspNetCore.Http.Connections.Common, Version=1.1.0.0, Culture=neutral,
PublicKeyToken=adb9793829ddae60'
What I understand is that despite the nuget highest version of Microsoft.AspNetCore.Http.Connections.Common
being 1.0.0.0, for some reason Microsoft.AspNetCore.SignalR.Client
requires 3.0.0.0 which does not exist (yet).
How can I tell VS to use Microsoft.AspNetCore.Http.Connections.Common 1.0.0.0 instead ?
I tried in my csproj to add specific version to the reference:
<PackageReference Include="Microsoft.AspNetCore.Http.Connections.Common" Version="1.1.0">
<SpecificVersion>False</SpecificVersion>
</PackageReference>
But nothing changed. I also tried with <SpecificVersion>True</SpecificVersion>
, same result :(
Any help ?
Upvotes: 0
Views: 79
Reputation: 8672
Some of the .NET Core
prerelease libraries aren't available on the main NuGet
feed. You need to add the nightly/dev feed to your NuGet
package sources and, hopefully, it should be available there.
The feeds are:
ASP.NET Core
https://dotnet.myget.org/gallery/aspnetcore-dev
.NET Core
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
To add the feed to Visual Studio
Now you can change the Package Source in the NuGet window to either your new feed or "All" and click the 'include prerelease' to see the pre-release versions of the packages.
Upvotes: 1