http://stackoverflow.com/questions/227545/how-can-i-get-copy-to-output-directory-to-work-with-unit-tests

In VS2010 this is: Test/Edit Test Settings/local, then in the list, select "Deployment", check the "Enable..." box and add the file(s).Marcel Jun 16 '10 at 12:54

http://technet.microsoft.com/zh-cn/library/cc716756.aspx

 |DataDirectory| 解析为“<应用程序根目录>

 

http://stackoverflow.com/questions/13275054/ef5-cannot-attach-the-file-0-as-database-1

DataException->EntityException->SqlException:
Cannot attach the file ‘{0}' as database '{1}'

 

Alright.

I have no clue what's so great about the clunky LocalDB. Anyway my solution was simple, I changed to use local server:

I changed the DataSource attribute in the connection string from:

Data Source=(LocalDb)\v11.0;blah

To:

Data Source=.\SQLEXPRESS;blah

相关文章:

  • 2021-07-09
  • 2022-12-23
  • 2021-08-01
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-10-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-06-07
  • 2021-12-04
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案