Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Publishing doesn't show the "Entity Framework Migrations"

$
0
0

My project used to work perfectly for .NET Core 1.0, but moving to 1.1 is causing me days of headache!!  I've been usingMicrosoft Azure for publishing and hadn't had too many problems.

I think I'm down to just the database migrations.  I've been using migrations for quite a while now, but when I publish, I don't get the option to 'Apply this migration on publish'.

I have a second project that's working just fine.  When I open up the publishing screen, an icon spins saying 'Discovering Data Contexts...' and then changed to 'Entity Framework Migrations'.

But for the life of me, I can't get it to work with my main project!!

What could be preventing the 'Entity Framework Migrations' from appearing while publishing?  

I've done 'add-migration Init', 'update-database'

My ApplicationDbContext.cs is just a default, and works with the other project.

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options){
        }

dotnet --info

.NET Command Line Tools (1.0.0-preview2-1-003177)

And when I run locally, I can delete the SQL Database and Migration puts it back when I start.  So I know Migration is working properly.  I just can't get the option to show up during publish.

Thanks!!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>