In VS 2015 you can only select .net 3.5 and the version is 2.0.50727.8662 which is newer than what unity uses, im making a mssql express localdb file database dll, and works fine in my test project, but just will not open the database when its in unity, i belive the problem is due to unity using the older 1433 revsion… is there any hope that unity will update to at least the latest version of 3.5, because i dont see a work around for this… ive tried both named pipe sql connection and localdb method both work in my project, none work in unity!
Updated to Unity 5.2.2 same issue old .net.
** FIXED ** Unity 5.2.2 - 26/Oct/2015
Ok just for future refrance, like Dustin said mono dose not support many things to do with sql express, but you can install mssql express 2014, not the localdb one, some setting up is required and here it is…
Page to get MSQL express and tools http://www.microsoft.com/en-gb/server-cloud/products/sql-server-editions/sql-server-express.aspx
Install the sql server using defults. and install Managment studio which you use to configure the database etc
open managment studio, and connect to your server defult will be localhost\sqlexpress
Then create your database and tables as needed.
Create a new user login in managment studio and assosiate it with the database you created giving it approprate access.
Right click on the root of the list in managment studio, typically yourpcname\sqlexpress and choose properties, click on security, and select SQL Server and Windows Authentication mode. (Mono dosent support windows auth)
Your all setup now using managment studio… now load Sql server configuration manager, open up sql server network configuration and select protocols for sqlexpress, and enable TCP/IP. (Mono only supports TCP/IP)
Restart the SQL server for changes to happen.
Then connect to your server and database using this connection string…
Data Source=localhost\sqlexpress;Initial Catalog=database;Persist Security Info=True;User ID=username;Password=yourpass
Then it should work and this is the only way it dose work, least it dose for me…
Its a great shame that mono framwork is old, because i really wanted to use localdb file version of MSQL express, for one its a smaller download, two no configuration is needed, you just install it and then connect to it… i wanted an easy database method for my users to use with minumum effort in setting up… but now thats not possible… so i guess ill have to live with it for now.
Any questions just ask me, ill be happy to help…
Unity’s Mono .net framework is very old, ive worked out its definatly older than 7 years, which is pretty bad…
Check out Dustin’s explanation bellow on why the .net in unity hasent been kept up to date.