The problem was with visual studio which was using an sql instance for 2016, that is why it was not reading the database file created by sql server 2017. i fixed it by creating a new sql instance for sql localdb 2017 using sqllocaldb create which created the instance with the latest version of MSSQL(2017). Thank you all for your help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.