Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK mismatch <- posted originally @dotnet/cli #15739

Closed
orassr opened this issue May 16, 2019 · 6 comments
Closed

SDK mismatch <- posted originally @dotnet/cli #15739

orassr opened this issue May 16, 2019 · 6 comments

Comments

@orassr
Copy link

orassr commented May 16, 2019

Normally, when type dotnet ef the result is:

                          _/\__
              ---==/          \\
     ___  ___        |.          \|\
    | __|| __|        |         )   \\\
    | _| | _|          \_/       |  //|\\
    |___||_|                   /   \\\/\\

this time all I'm getting is that error again and again no matter what command it is
I tried to update database through Entity Framework when this error:

PM> dotnet ef database update
dotnet : The application to execute does not exist: 'C:\Users\orass\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.
At line:1 char:1

+ dotnet ef database update
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (The application...dotnet-ef.dll'.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError`
 

> PM> dotnet ef --version
dotnet : The application to execute does not exist: 'C:\Users\orass\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.
At line:1 char:1
+ dotnet ef --version
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (The application...dotnet-ef.dll'.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
PM> dotnet ef
dotnet : The application to execute does not exist: 'C:\Users\orass\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.
At line:1 char:1
+ dotnet ef
+ ~~~~~~~~~
    + CategoryInfo          : NotSpecified: (The application...dotnet-ef.dll'.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

According to the dotnet --info, the Base Path use sdk/3...compare to the error that says it looking for \tools\netcoreapp2.2

I believe this mismatch happens because I recently installed Visual Studio 2019 Preview

PM> dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview5-011568
 Commit:    b487ff10aa

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\

Host (useful for support):
  Version: 3.0.0-preview5-27626-15
  Commit:  61f30f5a23

.NET Core SDKs installed:
  2.0.2 [C:\Program Files\dotnet\sdk]
  2.1.2 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.100 [C:\Program Files\dotnet\sdk]
  2.1.104 [C:\Program Files\dotnet\sdk]
  2.1.200-preview-007474 [C:\Program Files\dotnet\sdk]
  2.1.200-preview-007517 [C:\Program Files\dotnet\sdk]
  2.1.200 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.300-preview2-008533 [C:\Program Files\dotnet\sdk]
  2.1.301 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.1.502 [C:\Program Files\dotnet\sdk]
  2.1.602 [C:\Program Files\dotnet\sdk]
  2.1.700-preview-009618 [C:\Program Files\dotnet\sdk]
  2.2.101 [C:\Program Files\dotnet\sdk]
  2.2.103 [C:\Program Files\dotnet\sdk]
  3.0.100-preview5-011568 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview2-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview2-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview5-19227-01 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-preview2-26406-04 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview5-27626-15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview5-27626-15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

I use VS 2019 Preview with the new SDK especially for Xamarin. My server side is .Net Core 2.x

@smitpatel
Copy link
Member

Do you have folder C:\Users\orass\.dotnet on your machine? Given none of the SDK is installed in that location, I wonder why it is trying to find dotnet ef executable in that folder. If the folder exists, then can you delete it and try again?

@bitrix1
Copy link

bitrix1 commented May 17, 2019

Error

PS C:\Users\Alex1\source\repos\Blazer\Blazer> dotnet ef migrations add InitialCreate
The application to execute does not exist: 'C:\Users\Alex1\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.
PS C:\Users\Alex1\source\repos\Blazer\Blazer>

I found this

PS C:\Users\Alex1\source\repos\Blazer\Blazer> ls C:\Users\Alex1\.dotnet\tools\.store\dotnet-ef\2.2.4\dotnet-ef\2.2.4\tools\netcoreapp2.2\any\


    C:\Users\Alex1\.dotnet\tools\.store\dotnet-ef\2.2.4\dotnet-ef\2.2.4\tools\netcoreapp2.2\any


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       17.05.2019     23:05                shims
d-----       17.05.2019     23:05                tools
-a----       22.03.2019      5:07           1111 dotnet-ef.deps.json
-a----       22.03.2019      5:06          75128 dotnet-ef.dll
-a----       22.03.2019      5:07            154 dotnet-ef.runtimeconfig.json
-a----       22.03.2019      5:07            194 DotnetToolSettings.xml
-a----       25.03.2018      0:44         665664 Newtonsoft.Json.dll

Info

PS C:\Users\Alex1\source\repos\Blazer\Blazer> dotnet --info
Пакет SDK для .NET Core (отражающий любой global.json):
 Version:   3.0.100-preview5-011568
 Commit:    b487ff10aa

Среда выполнения:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview5-011568\

Host (useful for support):
  Version: 3.0.0-preview5-27626-15
  Commit:  61f30f5a23

.NET Core SDKs installed:
  2.1.700-preview-009618 [C:\Program Files\dotnet\sdk]
  3.0.100-preview5-011568 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview5-19227-01 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview5-27626-15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview5-27626-15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Help ;(

@smitpatel
Copy link
Member

Delete the folder C:\Users\Alex1\.dotnet it seems corrupted.

@bitrix1
Copy link

bitrix1 commented May 17, 2019

Удалите папку, C:\Users\Alex1\.dotnetкоторая кажется поврежденной.

Remove C:\Users\Alex1\.dotnet and install.

dotnet tool install --global dotnet-ef
dotnet ef migrations add InitialCreate
The application to execute does not exist: 'C:\Users\Alex1\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.

Error.
Now a can't Remove C:\Users\Alex1\.dotnet , folder is block.
P.S. +5 min -> Now the folder itself is unlocked. :\\\\\\\\\\\

@smitpatel
Copy link
Member

Duplicate of #15448

@smitpatel smitpatel marked this as a duplicate of #15448 May 17, 2019
@orassr
Copy link
Author

orassr commented May 21, 2019

I ended removing VS Preview and the new 3.0 SDK, restore and it works again.
@smitpatel I do have that folder and I also removed and installed the runtime and the SDK - same results :/

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants