efcore icon indicating copy to clipboard operation
efcore copied to clipboard

The schema version of 'Microsoft.EntityFrameworkCore.Tools.DotNet' is incompatible with version 2.12.0.815 of NuGet

Open bdm4 opened this issue 10 years ago • 14 comments

Edited by @rowanmiller 11-29-2016

Workaround

If you hit this issue, you can resolve it by installing the latest beta of the NuGet Package Manager.

The issue arises because of a combination of requirements in pre-release tooling.


This one is really confusing to me but... I installed the new Tools.DotNet package: project.json: "Microsoft.EntityFrameworkCore.Tools.Dotnet": "1.0.0-preview3-final",

And now my package manager inside visual studio throws an error: Error Occured......Show errors in output/Dismiss. I click Show errors in output, and I get: The schema version of 'Microsoft.EntityFrameworkCore.Tools.DotNet' is incompatible with version 2.12.0.815 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

Nuget appears to be up to date in package manager.

Jump to the package manager console and type $host: Name : Package Manager Host Version : 3.5.0.1484 InstanceId : 015141c8-ed0c-4346-8cb1-ff76f59fddc4 UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-US CurrentUICulture : en-US PrivateData : NuGetConsole.Host.PowerShell.Implementation.NuGetPSHost+Commander DebuggerEnabled : True IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio -> Help -> About NuGet Package Manager 3.5.0

Naturally I am thinking there is another version of NuGet on my system But I can't figure this one out...

bdm4 avatar Nov 08 '16 21:11 bdm4

Can you make sure you have the latest preview of the .NET Core tooling installed - https://www.microsoft.com/net/core#windows. We think it may be an outdated version on NuGet included in an old version of the tooling.

rowanmiller avatar Nov 14 '16 18:11 rowanmiller

.Net Core 1.0.1 Tooling Preview 2 was already installed. I tried a repair install and no luck.

bdm4 avatar Nov 14 '16 21:11 bdm4

We're not really sure what is happening here. It's not an issue we have seen before. One idea we had was to try using Fusion logs to try and work out what is loading the older version of NuGet, and where the older assemblies are located.

rowanmiller avatar Nov 16 '16 17:11 rowanmiller

Am having the same issue here. Tried using Fusion Logs but all the bindings seemed to be with NuGet 3.5. If I remove Microsoft.EntityFrameworkCore.Tools.DotNet from my project.json everything returns to normal. The update and browse tabs of the manager seem to work fine too. The package manager console command Get-Package works just fine.

Or4c avatar Nov 21 '16 20:11 Or4c

Are you still seeing this with the latest tooling release 1.1.0-preview4?

rowanmiller avatar Nov 21 '16 20:11 rowanmiller

Yes. it's still happening with 1.1.0-preview4. If I remove "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final", from project.json nuget starts working again.

bdm4 avatar Nov 21 '16 21:11 bdm4

cc @yishaigalatzer to see if you have any ideas how to debug this one

rowanmiller avatar Nov 22 '16 19:11 rowanmiller

In the meantime, using the nuget package works: Install-Package Microsoft.EntityFrameworkCore.Tools -Pre PMC commands are documented here: https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell

lnaie avatar Nov 22 '16 21:11 lnaie

@bdm4 @lnaie I suspect it is possible that this issue surfaces for solutions that were originally created with Visual Studio 2013 and configured to use the MSBuild-integrated package restore functionality that was the default before NuGet 2.7. If so, your solution could contain a .nuget folder and MSBuild targets that redirect to a copy of nuget.exe in that folder, which would likely be out of date.

In case this helps, the process to migrate to the newer automatic implementation of package restore is described here: http://docs.nuget.org/ndocs/consume-packages/package-restore#migrating-to-automatic-restore

divega avatar Nov 24 '16 02:11 divega

Some how you are required to install the latest beta of the Nuget Manager. Afterwards you can install the EF Tools package.

Please refer to: http://docs.nuget.org/ndocs/guides/install-nuget

origicom avatar Nov 24 '16 10:11 origicom

Hope everyone had a good holiday. So I decided to create a blank .net core project based on the template. Tools -> Manage Nuget... -> Installed -> Error Occurred -> Show errors in output: The schema version of 'Microsoft.AspNetCore.Server.IISIntegration.Tools' is incompatible with version 2.12.0.815 of NuGet

Click updates 5 are available to push NETCore.App and others like it to 1.1.0, Select all, update. Click Installed. Same error as above.

🕐 hour goes by... google google google.

Find this: http://docs.nuget.org/ndocs/Guides/Install-NuGet.md

See this: NuGet Beta Channel, ok what the heck. I've tried everything else. Install the Beta Version of Nuget and restart VS.

It's working. 🍯

Prior to updating to the beta version I did do a couple of things:

  1. Open VS 2012, Clear the nuget cache (which is not in vs 2015)
  2. dir /s nuget.exe look for potential suspects for old links, ran nuget.exe update -self. Nothing was exciting with this.

EDIT: one post too late 🤕 installing the beta works.

bdm4 avatar Nov 29 '16 17:11 bdm4

Added the workaround/resolution to the top of this issue.

Closing this out as it is a combination of pre-release tooling and will resolve as our pre-releases RTM and propagate.

rowanmiller avatar Nov 29 '16 18:11 rowanmiller

Had the same issue. Closing my project and then running dotnet restore on the directory seemed to solve it. I did not install the beta of nuget.

Netizine avatar Dec 12 '16 17:12 Netizine

Spent half an hour searching my system for an old version of nuget (2.12) that I didn't have anywhere because the error message completely threw me off. If you can't display accurate information in an error then don't show anything. Sheesh.

tkoestler avatar Feb 11 '17 22:02 tkoestler