6
When executing the command Update-Database
I have the following error
Could not load file or Assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, Publickeytoken=b03f5f7f11d50a3a' or one of its dependencies.
The whole output of command
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
No pending explicit migrations.
Running Seed method.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
File name: 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Syns.Common.SynsLegadoContext.Auditar()
at Syns.Common.SynsLegadoContext.SaveChangesAsync(CancellationToken cancellationToken) in D:\Projetos\Syns\Syns\Syns\SynsLegadoContext.cs:line 38
at System.Data.Entity.DbContext.SaveChangesAsync()
at Microsoft.AspNet.Identity.EntityFramework.UserStore`6.<SaveChanges>d__5a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.EntityFramework.UserStore`6.<UpdateAsync>d__1c.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.UserManager`2.<UpdateAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.AspNet.Identity.UserManager`2.<RemovePasswordAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.AsyncHelper.RunSync[TResult](Func`1 func)
at Microsoft.AspNet.Identity.UserManagerExtensions.RemovePassword[TUser,TKey](UserManager`2 manager, TKey userId)
at Syns.Common.Migrations.Configuration.AlterarSenhaUsuarios() in D:\Projetos\Syns\Syns\Syns\Migrations\Configuration.cs:line 265
at Syns.Common.Migrations.Configuration.Seed(SynsLegadoContext context) in D:\Projetos\Syns\Syns\Syns\Migrations\Configuration.cs:line 41
at System.Data.Entity.Migrations.DbMigrationsConfiguration`1.OnSeed(DbContext context)
at System.Data.Entity.Migrations.DbMigrator.SeedDatabase()
at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.SeedDatabase()
at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClasse.<Update>b__d()
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration)
at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.RunCore()
at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()
AVI: o log de associações de assembly está desativado.
Para ativar o log de falhas de assembly, defina o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1.
Observação: há alguma penalidade para o desempenho associada ao log de falha de associação de assembly.
Para desativar esse recurso, remova o valor do Registro [HKLM\Software\Microsoft\Fusion!EnableLog].
Could not load file or assembly 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. O sistema não pode encontrar o arquivo especificado.
Check your config for Microsoft.Build.Framework if you haven’t been using it or haven’t installed it, delete the line that contains it from web.config. if you don’t install it in your project.
– Marco Souza
I have no reference to Microsoft.Build.Framework on my web.config
– Pablo Tondolo de Vargas
Weird, somewhere he’s trying to access this dll. has an answer ... https://stackoverflow.com/a/43498190/2740371
– Marco Souza
Closing and opening VS is not very productive
– Pablo Tondolo de Vargas
What I did is in this answer https://stackoverflow.com/a/44723132/2221388 so far has solved the problem for me.
– Pablo Tondolo de Vargas
I’ve seen a setting to makes it kind of standard, but now I can’t remember what it was like.
– Marco Souza
Because it is, every new update of VS it puts back the path of dll with ....
– Pablo Tondolo de Vargas