The specified framework 'Microsoft.NETCore.App', version '2.1' was not found
I am developing an Angular 6 application in dotNet Core 2.1.
Everything is working flawlessly, until I got to setting up EFCore.
All my models are defined and context created. Running dotnet ef migrations add InitialCreate
gives me the "The specified framework 'Microsoft.NETCore.App', version '2.1' was not found" error.
I have searched and read all the posts I could find that has this error across various versions of dotNet Core. Nothing is working to resolve this issue for me.
I have various versions of dotNet Core App installed.
Looking at "C:Program FilesdotnetsharedMicrosoft.NETCore.App" I have the following:
-1.0.4
-1.0.5
-1.1.1
-1.1.2
-2.0.0
-2.0.3
-2.0.5
-2.0.6
-2.0.7
-2.0.9
-2.1.0
-2.1.4
-2.1.5
-2.1.6
"C:Program Filesdotnet" appears as the first path in my System PATH variable.
Downgrading all the projects in my solution to dotNet Core 2.0, running the command results in exactly the same error, referring to version 2.0.
Any advise would be greatly appreciated...
The csproj file for my EF project is as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..*********.Contracts*********.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System">
<HintPath>System</HintPath>
</Reference>
<Reference Include="System.Data">
<HintPath>System.Data</HintPath>
</Reference>
<Reference Include="System.Xml">
<HintPath>System.Xml</HintPath>
</Reference>
</ItemGroup>
</Project>
c# ef-core-2.1 .net-core-2.1
|
show 9 more comments
I am developing an Angular 6 application in dotNet Core 2.1.
Everything is working flawlessly, until I got to setting up EFCore.
All my models are defined and context created. Running dotnet ef migrations add InitialCreate
gives me the "The specified framework 'Microsoft.NETCore.App', version '2.1' was not found" error.
I have searched and read all the posts I could find that has this error across various versions of dotNet Core. Nothing is working to resolve this issue for me.
I have various versions of dotNet Core App installed.
Looking at "C:Program FilesdotnetsharedMicrosoft.NETCore.App" I have the following:
-1.0.4
-1.0.5
-1.1.1
-1.1.2
-2.0.0
-2.0.3
-2.0.5
-2.0.6
-2.0.7
-2.0.9
-2.1.0
-2.1.4
-2.1.5
-2.1.6
"C:Program Filesdotnet" appears as the first path in my System PATH variable.
Downgrading all the projects in my solution to dotNet Core 2.0, running the command results in exactly the same error, referring to version 2.0.
Any advise would be greatly appreciated...
The csproj file for my EF project is as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..*********.Contracts*********.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System">
<HintPath>System</HintPath>
</Reference>
<Reference Include="System.Data">
<HintPath>System.Data</HintPath>
</Reference>
<Reference Include="System.Xml">
<HintPath>System.Xml</HintPath>
</Reference>
</ItemGroup>
</Project>
c# ef-core-2.1 .net-core-2.1
Can you show your project file? It's likely that there's a version reference there somewhere that's causing trouble...
– Tomas Aschan
Nov 18 '18 at 10:13
Try to install this Nuget package to the project. Even though you don’t use it in that project
– OlegI
Nov 18 '18 at 10:14
@TomasAschan: Do you mean the csproj file? I have multiples, designating multi layers to the application. Would it then be the project where EF resides?
– WJK
Nov 18 '18 at 10:16
1
Check out Entity Framework Core tools reference - .NET CLI. Have you followed the Installing the tools instructions? What do you get if you rundotnet ef
command to verify the installation?
– Ivan Stoev
Nov 18 '18 at 10:56
1
Holy $h1t, thanks Ivan. Reading through installing the tools again, I ran "dotnet add package Microsoft.EntityFrameworkCore.Design" and it seems to have solved the problem. It added "<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />" to my project file. As always, the Microsoft errors are extremely vague and often does not point to the real problem at all...
– WJK
Nov 18 '18 at 11:32
|
show 9 more comments
I am developing an Angular 6 application in dotNet Core 2.1.
Everything is working flawlessly, until I got to setting up EFCore.
All my models are defined and context created. Running dotnet ef migrations add InitialCreate
gives me the "The specified framework 'Microsoft.NETCore.App', version '2.1' was not found" error.
I have searched and read all the posts I could find that has this error across various versions of dotNet Core. Nothing is working to resolve this issue for me.
I have various versions of dotNet Core App installed.
Looking at "C:Program FilesdotnetsharedMicrosoft.NETCore.App" I have the following:
-1.0.4
-1.0.5
-1.1.1
-1.1.2
-2.0.0
-2.0.3
-2.0.5
-2.0.6
-2.0.7
-2.0.9
-2.1.0
-2.1.4
-2.1.5
-2.1.6
"C:Program Filesdotnet" appears as the first path in my System PATH variable.
Downgrading all the projects in my solution to dotNet Core 2.0, running the command results in exactly the same error, referring to version 2.0.
Any advise would be greatly appreciated...
The csproj file for my EF project is as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..*********.Contracts*********.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System">
<HintPath>System</HintPath>
</Reference>
<Reference Include="System.Data">
<HintPath>System.Data</HintPath>
</Reference>
<Reference Include="System.Xml">
<HintPath>System.Xml</HintPath>
</Reference>
</ItemGroup>
</Project>
c# ef-core-2.1 .net-core-2.1
I am developing an Angular 6 application in dotNet Core 2.1.
Everything is working flawlessly, until I got to setting up EFCore.
All my models are defined and context created. Running dotnet ef migrations add InitialCreate
gives me the "The specified framework 'Microsoft.NETCore.App', version '2.1' was not found" error.
I have searched and read all the posts I could find that has this error across various versions of dotNet Core. Nothing is working to resolve this issue for me.
I have various versions of dotNet Core App installed.
Looking at "C:Program FilesdotnetsharedMicrosoft.NETCore.App" I have the following:
-1.0.4
-1.0.5
-1.1.1
-1.1.2
-2.0.0
-2.0.3
-2.0.5
-2.0.6
-2.0.7
-2.0.9
-2.1.0
-2.1.4
-2.1.5
-2.1.6
"C:Program Filesdotnet" appears as the first path in my System PATH variable.
Downgrading all the projects in my solution to dotNet Core 2.0, running the command results in exactly the same error, referring to version 2.0.
Any advise would be greatly appreciated...
The csproj file for my EF project is as follows:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..*********.Contracts*********.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System">
<HintPath>System</HintPath>
</Reference>
<Reference Include="System.Data">
<HintPath>System.Data</HintPath>
</Reference>
<Reference Include="System.Xml">
<HintPath>System.Xml</HintPath>
</Reference>
</ItemGroup>
</Project>
c# ef-core-2.1 .net-core-2.1
c# ef-core-2.1 .net-core-2.1
edited Nov 18 '18 at 10:33
asked Nov 18 '18 at 10:09
WJK
1781214
1781214
Can you show your project file? It's likely that there's a version reference there somewhere that's causing trouble...
– Tomas Aschan
Nov 18 '18 at 10:13
Try to install this Nuget package to the project. Even though you don’t use it in that project
– OlegI
Nov 18 '18 at 10:14
@TomasAschan: Do you mean the csproj file? I have multiples, designating multi layers to the application. Would it then be the project where EF resides?
– WJK
Nov 18 '18 at 10:16
1
Check out Entity Framework Core tools reference - .NET CLI. Have you followed the Installing the tools instructions? What do you get if you rundotnet ef
command to verify the installation?
– Ivan Stoev
Nov 18 '18 at 10:56
1
Holy $h1t, thanks Ivan. Reading through installing the tools again, I ran "dotnet add package Microsoft.EntityFrameworkCore.Design" and it seems to have solved the problem. It added "<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />" to my project file. As always, the Microsoft errors are extremely vague and often does not point to the real problem at all...
– WJK
Nov 18 '18 at 11:32
|
show 9 more comments
Can you show your project file? It's likely that there's a version reference there somewhere that's causing trouble...
– Tomas Aschan
Nov 18 '18 at 10:13
Try to install this Nuget package to the project. Even though you don’t use it in that project
– OlegI
Nov 18 '18 at 10:14
@TomasAschan: Do you mean the csproj file? I have multiples, designating multi layers to the application. Would it then be the project where EF resides?
– WJK
Nov 18 '18 at 10:16
1
Check out Entity Framework Core tools reference - .NET CLI. Have you followed the Installing the tools instructions? What do you get if you rundotnet ef
command to verify the installation?
– Ivan Stoev
Nov 18 '18 at 10:56
1
Holy $h1t, thanks Ivan. Reading through installing the tools again, I ran "dotnet add package Microsoft.EntityFrameworkCore.Design" and it seems to have solved the problem. It added "<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />" to my project file. As always, the Microsoft errors are extremely vague and often does not point to the real problem at all...
– WJK
Nov 18 '18 at 11:32
Can you show your project file? It's likely that there's a version reference there somewhere that's causing trouble...
– Tomas Aschan
Nov 18 '18 at 10:13
Can you show your project file? It's likely that there's a version reference there somewhere that's causing trouble...
– Tomas Aschan
Nov 18 '18 at 10:13
Try to install this Nuget package to the project. Even though you don’t use it in that project
– OlegI
Nov 18 '18 at 10:14
Try to install this Nuget package to the project. Even though you don’t use it in that project
– OlegI
Nov 18 '18 at 10:14
@TomasAschan: Do you mean the csproj file? I have multiples, designating multi layers to the application. Would it then be the project where EF resides?
– WJK
Nov 18 '18 at 10:16
@TomasAschan: Do you mean the csproj file? I have multiples, designating multi layers to the application. Would it then be the project where EF resides?
– WJK
Nov 18 '18 at 10:16
1
1
Check out Entity Framework Core tools reference - .NET CLI. Have you followed the Installing the tools instructions? What do you get if you run
dotnet ef
command to verify the installation?– Ivan Stoev
Nov 18 '18 at 10:56
Check out Entity Framework Core tools reference - .NET CLI. Have you followed the Installing the tools instructions? What do you get if you run
dotnet ef
command to verify the installation?– Ivan Stoev
Nov 18 '18 at 10:56
1
1
Holy $h1t, thanks Ivan. Reading through installing the tools again, I ran "dotnet add package Microsoft.EntityFrameworkCore.Design" and it seems to have solved the problem. It added "<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />" to my project file. As always, the Microsoft errors are extremely vague and often does not point to the real problem at all...
– WJK
Nov 18 '18 at 11:32
Holy $h1t, thanks Ivan. Reading through installing the tools again, I ran "dotnet add package Microsoft.EntityFrameworkCore.Design" and it seems to have solved the problem. It added "<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />" to my project file. As always, the Microsoft errors are extremely vague and often does not point to the real problem at all...
– WJK
Nov 18 '18 at 11:32
|
show 9 more comments
1 Answer
1
active
oldest
votes
To solve the issue, I had to install the Microsoft.EntityFrameworkCore.Design
package. The installing-the-tools section of the documentation states that it is not necessary to do so for Asp.Net Core 2.1+:
ASP.NET Core 2.1+
- Install the current .NET Core SDK. The SDK has to be installed even if you have the latest version of Visual Studio 2017.
This is all that is needed for ASP.NET Core 2.1+ because theMicrosoft.EntityFrameworkCore.Design
package is included in the Microsoft.AspNetCore.App metapackage.
My solution is broken up into different projects; I created a Class Library project where my EF Core installation resides.
Since it is not an Asp.Net Core project (It's a Class Library as stated before), it also required the Microsoft.EntityFrameworkCore.Design
package to be installed.
The package can be installed using: dotnet add package Microsoft.EntityFrameworkCore.Design
Thanks to Ivan Stoev for pointing me in the direction of the documentation.
The error was no help at all, sending me on a wild goose chase to try and find the underlying problem. I hope this will be useful to someone else.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53359743%2fthe-specified-framework-microsoft-netcore-app-version-2-1-was-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To solve the issue, I had to install the Microsoft.EntityFrameworkCore.Design
package. The installing-the-tools section of the documentation states that it is not necessary to do so for Asp.Net Core 2.1+:
ASP.NET Core 2.1+
- Install the current .NET Core SDK. The SDK has to be installed even if you have the latest version of Visual Studio 2017.
This is all that is needed for ASP.NET Core 2.1+ because theMicrosoft.EntityFrameworkCore.Design
package is included in the Microsoft.AspNetCore.App metapackage.
My solution is broken up into different projects; I created a Class Library project where my EF Core installation resides.
Since it is not an Asp.Net Core project (It's a Class Library as stated before), it also required the Microsoft.EntityFrameworkCore.Design
package to be installed.
The package can be installed using: dotnet add package Microsoft.EntityFrameworkCore.Design
Thanks to Ivan Stoev for pointing me in the direction of the documentation.
The error was no help at all, sending me on a wild goose chase to try and find the underlying problem. I hope this will be useful to someone else.
add a comment |
To solve the issue, I had to install the Microsoft.EntityFrameworkCore.Design
package. The installing-the-tools section of the documentation states that it is not necessary to do so for Asp.Net Core 2.1+:
ASP.NET Core 2.1+
- Install the current .NET Core SDK. The SDK has to be installed even if you have the latest version of Visual Studio 2017.
This is all that is needed for ASP.NET Core 2.1+ because theMicrosoft.EntityFrameworkCore.Design
package is included in the Microsoft.AspNetCore.App metapackage.
My solution is broken up into different projects; I created a Class Library project where my EF Core installation resides.
Since it is not an Asp.Net Core project (It's a Class Library as stated before), it also required the Microsoft.EntityFrameworkCore.Design
package to be installed.
The package can be installed using: dotnet add package Microsoft.EntityFrameworkCore.Design
Thanks to Ivan Stoev for pointing me in the direction of the documentation.
The error was no help at all, sending me on a wild goose chase to try and find the underlying problem. I hope this will be useful to someone else.
add a comment |
To solve the issue, I had to install the Microsoft.EntityFrameworkCore.Design
package. The installing-the-tools section of the documentation states that it is not necessary to do so for Asp.Net Core 2.1+:
ASP.NET Core 2.1+
- Install the current .NET Core SDK. The SDK has to be installed even if you have the latest version of Visual Studio 2017.
This is all that is needed for ASP.NET Core 2.1+ because theMicrosoft.EntityFrameworkCore.Design
package is included in the Microsoft.AspNetCore.App metapackage.
My solution is broken up into different projects; I created a Class Library project where my EF Core installation resides.
Since it is not an Asp.Net Core project (It's a Class Library as stated before), it also required the Microsoft.EntityFrameworkCore.Design
package to be installed.
The package can be installed using: dotnet add package Microsoft.EntityFrameworkCore.Design
Thanks to Ivan Stoev for pointing me in the direction of the documentation.
The error was no help at all, sending me on a wild goose chase to try and find the underlying problem. I hope this will be useful to someone else.
To solve the issue, I had to install the Microsoft.EntityFrameworkCore.Design
package. The installing-the-tools section of the documentation states that it is not necessary to do so for Asp.Net Core 2.1+:
ASP.NET Core 2.1+
- Install the current .NET Core SDK. The SDK has to be installed even if you have the latest version of Visual Studio 2017.
This is all that is needed for ASP.NET Core 2.1+ because theMicrosoft.EntityFrameworkCore.Design
package is included in the Microsoft.AspNetCore.App metapackage.
My solution is broken up into different projects; I created a Class Library project where my EF Core installation resides.
Since it is not an Asp.Net Core project (It's a Class Library as stated before), it also required the Microsoft.EntityFrameworkCore.Design
package to be installed.
The package can be installed using: dotnet add package Microsoft.EntityFrameworkCore.Design
Thanks to Ivan Stoev for pointing me in the direction of the documentation.
The error was no help at all, sending me on a wild goose chase to try and find the underlying problem. I hope this will be useful to someone else.
answered Nov 19 '18 at 12:07
WJK
1781214
1781214
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53359743%2fthe-specified-framework-microsoft-netcore-app-version-2-1-was-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you show your project file? It's likely that there's a version reference there somewhere that's causing trouble...
– Tomas Aschan
Nov 18 '18 at 10:13
Try to install this Nuget package to the project. Even though you don’t use it in that project
– OlegI
Nov 18 '18 at 10:14
@TomasAschan: Do you mean the csproj file? I have multiples, designating multi layers to the application. Would it then be the project where EF resides?
– WJK
Nov 18 '18 at 10:16
1
Check out Entity Framework Core tools reference - .NET CLI. Have you followed the Installing the tools instructions? What do you get if you run
dotnet ef
command to verify the installation?– Ivan Stoev
Nov 18 '18 at 10:56
1
Holy $h1t, thanks Ivan. Reading through installing the tools again, I ran "dotnet add package Microsoft.EntityFrameworkCore.Design" and it seems to have solved the problem. It added "<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.4" />" to my project file. As always, the Microsoft errors are extremely vague and often does not point to the real problem at all...
– WJK
Nov 18 '18 at 11:32