EF5 Migration Update-Database - Script Error

I am using Visual Studio 2012 RC with a trial license without any problems. Yesterday I bought Visual Studio 2012 Professional, installed the latest version and installed update 1.

I have a solution / project that I have been working on for many years. It has many migrations. I ran the first add-migration TableX_NewField and update-database -sourcemigration:TableX_PreviousNewField in this latest version.

Both of them ran without problems.

Then I ran update-database -script -sourcemigration:TableX_PreviousNewField and got the following:

 PM> update-database -script -sourcemigration:TableX_PreviousNewField Applying code-based migrations: [201301151003149_TableX_NewField]. Applying code-based migration: 201301151003149_TableX_NewField. System.Runtime.InteropServices.COMException (0x8004000C): User canceled out of save dialog (Exception from HRESULT: 0x8004000C (OLE_E_PROMPTSAVECANCELLED)) at EnvDTE.ItemOperations.OpenFile(String FileName, String ViewKind) at System.Data.Entity.Migrations.Utilities.DomainDispatcher.OpenFile(String fileName) at System.Data.Entity.Migrations.Utilities.DomainDispatcher.OpenFile(String fileName) at System.Data.Entity.Migrations.Extensions.ProjectExtensions.NewSqlFile(Project project, String contents) at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0() at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command) User canceled out of save dialog (Exception from HRESULT: 0x8004000C (OLE_E_PROMPTSAVECANCELLED)) 

I ran updates for Windows. Checked for updates using NuGet. Rebooted the computer. There is still a mistake.

+43
entity-framework-5 entity-framework code-first-migrations ef-migrations
Jan 15 '13 at
source share
2 answers

I noticed in visual studio, going to the SQL menu, Transact-SQL Editor, New Query ... gave a dialog about tools that do not work with the installed server. Install SQL Server Data Tools - December 2012 Update ( Sql Server Data Tools ) fixed the problem

+66
Feb 05 '13 at 22:15
source share
— -

This issue has been resolved. I uninstalled and then installed and the problem was not resolved. Then I did two things at the same time; so i don't know what the problem is:

  • Deleted all folders and files in% temp%.
  • Ran devenv / resetsettings.

Hope this helps anyone facing a similar issue.

+4
Jan 16 '13 at 19:08
source share



All Articles