-1

I made EntityFramework (6) CodeFirst WinForms application On my machine it works fine but when I'm trying to make Installation (with VS 2015 Installing projects) of my project and to run it on another machine, I get Expansion of Data Directory failed I'm really dont understand- when I'm trying to change db name in ConnectionString to some wrong name- it still works. My connection string in app config:

Elishal
  • 1
  • 2

1 Answers1

0

I found what was the problem. It is not enough to pass the name of connection string via Entity context constructor :base(ConnectionString). Entity context name MUST be the same as Connection string in app config. Other way EF create some another db.

Elishal
  • 1
  • 2