Closed KCGCJohnJones closed 8 years ago
@natemcmaster could you please check if you can repro this?
@KCGCJohnJones I'm guessing this is https://github.com/dotnet/cli/issues/2528. Can you zip up and share the following files?
%USERPROFILE%\.nuget\packages\.tools\Microsoft.EntityFrameworkCore.Tools\1.0.0-preview2-final\netcoreapp1.0\project.lock.json
%USERPROFILE%\.nuget\packages\.tools\Microsoft.EntityFrameworkCore.Tools\1.0.0-preview2-final\netcoreapp1.0\Microsoft.EntityFrameworkCore.Tools.deps.json
Then, delete %USERPROFILE%\.nuget\packages\.tools\Microsoft.EntityFrameworkCore.Tools\1.0.0-preview2-final\
and re-run NuGet package restore.
netcoreapp1.0.zip Sure thing. Had the same result.
Thanks @KCGCJohnJones. The deps.json file you shared in the zip (%USERPROFILE%\.nuget\packages\.tools\Microsoft.EntityFrameworkCore.Tools\1.0.0-preview2-final\netcoreapp1.0\Microsoft.EntityFrameworkCore.Tools.deps.json
) shows that .NET Core CLI is resolving .NET Framework dependencies instead of .NET Core dependencies for this tools package. cc @piotrpMSFT
Two questions:
(1) Can you share the full version info about the .NET Core CLI do you have installed? (Execute dotnet --info
in the Package Manager Console window). Although it appears you have the Preview 2 version installed, it is still possible EF Core commands are finding the wrong version.
(2) To be 100% sure we're not , your project.json tools section does not use "imports", right? It should only have the tool name and version:
"tools": {
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
},
I'm just trying to verify that you're not encountering this known issue: https://github.com/aspnet/EntityFramework/issues/5458#issuecomment-221912806
PM> dotnet --info .NET Command Line Tools (1.0.0-preview1-002702)
Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e
Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64 PM>
"tools": { "BundlerMinifier.Core": "2.0.238", "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final", "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final" },
Here are my settings.
@KCGCJohnJones can you updating to .NET CLI preview 2? https://www.microsoft.com/net/core#windows If you already have preview 2 installed, try uninstalling preview 1. Then repeat the instructions in https://github.com/aspnet/EntityFramework/issues/6250#issuecomment-238339524 (delete the files and re-run restore.)
I ended up uninstalling both preview 1 and 2.
After I uninstalled preview 1 I kept getting "Scaffold-DbContext" is not recognized as the name of a cmdlet. So I uninstalled preview 2 as well.
When I re-installed preview I got an error stating to restart windows due to un finished installation.
After a reboot I tried to install preview2 and got an error stating install had failed due to incomplete visual studio 2015 update 3. I googled this error and found an article that stated to run DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1.
This got the installer to complete preview 2.
After all this I was finally able to complete the tutorial.
Thank you for the help.
Thanks for sharing your fix @KCGCJohnJones. Marking as "closed-external" as the issue appears to have been caused by using an old version of .NET Core CLI.
Steps to reproduce
Follwing the guide at https://docs.efproject.net/en/latest/platforms/aspnetcore/existing-db.html
The issue
Every step completes correctly up until:
dotnet flashes a white box on the screen Exception message: Stack trace:
If I add -Verbose.
Further technical details
EF Core version: (found in project.json or packages.config) Operating system: Win10 64bit Visual Studio version: Microsoft Visual Studio Professional 2015 Version 14.0.25425.01 Update 3 Microsoft .NET Framework Version 4.6.01038
Other details about my project setup: