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

Build Failed at the "Create the initial migration" step #1093

Closed
JFallenArch opened this issue Nov 1, 2018 — with docs.microsoft.com · 6 comments
Closed

Build Failed at the "Create the initial migration" step #1093

JFallenArch opened this issue Nov 1, 2018 — with docs.microsoft.com · 6 comments

Comments

Copy link

I did exactly the same as this tutorial but I found this in the Error List:
Error NU1201 Project Blogging.Migrations.Startup is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project Blogging.Migrations.Startup supports: netcoreaSeverity Code Description Project File Line Suppression State
Error NU1201 Project Blogging.Migrations.Startup is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Project Blogging.Migrations.Startup supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) Blogging.Model C:\Users\johnn\source\repos\Blogging\Blogging.Model\Blogging.Model.csproj 1
pp2.1(.NETCoreApp,Version=v2.1) Blogging.Model


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Copy link

I have the same issue - help would be appriciated

Copy link

I had this problem, but got it to build with a small change to the Add-Migration command in package manager.

Note: I'm Using DotNetCore v2.2, and the EF-Core version matches (v2.2)

There are two ways to do this the one I used is the first...
Method #1:
a.)Go into Package Manager Console in VS.
b.) Set the "Default project" to your model project "Blogging.Model"
c.) Run the following command

Add-Migration InitialCreate -StartupProject Blogging.Migrations.Startup

this works because it will use the default project you selected to find the DbContext, and the Startup Project to run the commands.

Method 2:
Type the command:
Add-Migration -Project Blogging.Model -StartupProject Blogging.Migrations.Startup

this should combine all the concepts from method 1 into a single command line, and it shouldn't matter whats selected as the default project in the Package Manager Console.

@mnuess
Copy link

mnuess commented Dec 23, 2018

I have the same issue. Altough I ensured my "Default project" is set to "Blogging.Model".

So unfortunately none of your methods worked for me.

Copy link

i can't get this working .. like others i think the referencing is wrong or running into .net standard 2 vs .netcoreapp 3 issues ... Please fix these samples

@akuma06
Copy link

akuma06 commented Jan 20, 2019

@liquidboy Please refer to the solution from this issue #1242

@ajcvickers
Copy link
Member

Duplicate of #933

@ajcvickers ajcvickers marked this as a duplicate of #933 Aug 29, 2019
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

7 participants