3
I am creating a new code-first project. When trying to create Migration, using the command [Add-Migration Initial -Context LogAuditoriaContext]
it simply does nothing, creates nothing, makes no mistake, informs nothing:
I’ve tried mapping with FluentAPI
so much on the OnModelCreating()
as in separate files, the result is the same.
Looking at the Output Window, it shows:
Build: 0 succeeded, 0 failed, 6 up-to-date, 0 skipped
I am using dot.net core 2.0 and C# 7.2.
UPDATE (Solution)
With the tips of @Armindo Gomes, I found out that the problem was the connection string, just change the name of LogAuditoria
for LogAuditoriaConnection
and its references in Startup and LogAuditoriaContext
.
has already run Enable-Migrations ?
– Marco Souza
https://msdn.microsoft.com/en-us/library/jj193542(v=vs.113). aspx
– Marco Souza
@Marconciliosouza, Enable-Migrations is obsolete in Entity framework core. Now Add-Migration is used
– LeoFelipe
I think, it’s really nice, there’s a dotted green line in the configuration json in the key
LogAuditoria
I think we’re missing a barDesktop\SqlExpress
should beDesktop\\SqlExpress
takes the test!– novic
@Leofelipe, true, had not seen that it was core shausa... der a Clean Solution and Compile again.
– Marco Souza
@Virgilionovic, if you ask me, you really should have two bars. but unfortunately it was not the case to solve, but thank you anyway.
– LeoFelipe
@Marconcilio Souza, had already made the clean and rebuild, but without success.
– LeoFelipe
@Leofelipe, have tried following the steps https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/migrations?
– Marco Souza
could you upload the detailed log of VS? https://elbruno.com/2015/01/06/vs2015-howto-show-more-detail-in-a-local-buildin-the-visual-studio-ide/
– rodrigorf