ZZZ Code AI
Report Issues
Suggest Features
Login
EF Core Tools
Chat
Code Explain
More Tools
How to fix in EF Core: Your startup project '[StartupProjectName]' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.
<div class="h9">Exception Message:</div> <pre><code>PM> Add-Migration AddingEFExtensions Build started... Build succeeded. Your startup project 'Z.MyStartupProjectName' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again. </code></pre> <div class="image-outer"><img src="https://www.learnentityframeworkcore.com/images/efcore/migrations/add-migration/troubleshooting-your-startup-project-doesn-t-reference-microsoft-entityframeworkcore-design.png" loading="lazy" alt="Exception - Startup project not reference Microsoft.EntityFrameworkCore.Design"></div> <div class="h9">Cause:</div> <p>This error arises when the <a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Design">Microsoft.EntityFrameworkCore.Design</a> package is not referenced in your <code>Startup Project</code>.</p> <div class="h9">Solution:</div> <p>Make sure you have installed or referenced the <a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Design">Microsoft.EntityFrameworkCore.Design</a> package in your <code>Startup Project</code>.</p> <p>You can add this package via the NuGet Package Manager with:</p> <pre><code>Install-Package Microsoft.EntityFrameworkCore.Design </code></pre> <p>Or through the .NET CLI with:</p> <pre><code>dotnet add package Microsoft.EntityFrameworkCore.Design </code></pre>
Sponsored by
Entity Framework Extensions
This field is required
A text with a minimum of 10 characters is required
Send
Legal & Licensing
Answer generated by AI may produce inaccurate information about code, people, facts, and more.
Advertising Break!
5
seconds left
Did you know...
That you can now sponsor this project on
GitHub
?