EF add-migration throwing System.OutOfMemoryException

When I try to add a migration file through PM, I get an exception in memory. Has anyone else had this problem before and happens to know how to fix it? While I tried to install VS 2013 to no avail

Monitor my memory usage. I have 12 GB and it uses less than 8 while the add migration is in progress, so should be enough. Below is the output

PM> add-migration test

System.OutOfMemoryException: type exception Fixed "System.OutOfMemoryException". in System.AppDomain.DoCallBack (CrossAppDomainDelegate callBackDelegate)
in System.Data.Entity.Migrations.Design.ToolingFacade.Run (BaseRunner runner) in System.Data.Entity.Migrations.Design.ToolingFacade.Scaffold (String StringName rootNamespace, Boolean ignoreChanges) in System.Data.Entity.Migrations.AddMigrationCommand.Execute (string name, Boolean force, Boolean ignoreChanges) with System.Data.Entity.Migrations.AddMigrationCommand <. > C__DisplayClass2 <.. ctor> b__0 () in System.Data.Entity.Migrations.MigrationsDomainCommand.Execute (Action command) An exception of type "System.OutOfMemoryException" was thrown.

+4
5

Visual Studio .

+6

, - . . ReSharper, . , . magicandre1981 , .

EDIT: ReSharper, , - 8.2 # edition, build 8.2.0.2160

+3

. ReSharper (2017.2), . , . . OutOfMemoryException, .

0
source

I just happened to me. I slowly returned my steps and deleted DbSets in dbContext one by one until it worked again.

0
source

Solved in Visual Studio 2015 with Auto Suspend Function . You will get a popup as shown below.

enter image description here

Just click Re-enable .

0
source

Source: https://habr.com/ru/post/1622100/


All Articles