episerver / musicfestival-vue-template

The Vue.js version of the MusicFestival template site
https://world.episerver.com/documentation/developer-guides/CMS/editing/on-page-editing-with-client-side-rendering/
Apache License 2.0
41 stars 19 forks source link

Add information to readme.md that SQL Server 2016 Express LocalDB is required for the default setup #1

Closed alasvant closed 6 years ago

alasvant commented 6 years ago

The default database file is created with SQL Server 2016 so to run this sample users need the SQL Server 2016 Express LocalDB installed (LocalDB is included only in the SQL Server 2016 Express with Advanced Services package). So this information would be nice to be included next to the npm version requirement. EDITED Clarification, enough to use Visual Studio 2017 as it contains a version of 2016 LocalDB but if you for example have installed a previous version of SQL Server 2014 Express for example then most likely the LocalDB version for MSSQLLocalDB is too old for the version used in music festival. If using VS2015 you might only have the default instance named v11.0 (not 100% sure about this).

In some cases users might have multiple SQL Server versions installed side by side and in some cases the LocalDB of SQL Server 2016 Express installation might have gotten 'broken' in away that depending which versions sqllocaldb.exe is used various errors might come ( see for example this: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1257bf26-6ab0-416d-bf26-34f128f42248/sql-2016-sp1-sqllocaldb-versions-errors-with-quotwindows-api-call-quotreggetvaluewquot?forum=sqlexpress ). Depending on what service pack you have installed you might have version number 13.0. or 13.1 (SP1) or 13.2 (SP2). In these cases most likely the default MSSQLLocalDB is created with previous version and when you try to run the music festival you will get error message something like this: "Cannot be opened because it is version 852. This server supports version 782 and earlier" (Your version numbers might be different).

Above link might help to get the tool to work but still there might be the fact that your MSSQLLocalDB is created with earlier version.

So to work around this without destroying your existing attached files to MSSQLLocalDB you could create a new SQL Server 2016 localDB instance and modify connection string value in connectionStrings.cs

To make sure you are creating a new SQL Server 2016 Express LocalDB do the following:

The above command will create a new instance called "MSSQLLocalDB16", there is no version given so your systems latest version is created and the '-s' tells to start it immediatly.

Next change the instance name in connectionStrings.cs from MSSQLLocalDB to MSSQLLocalDB16.

Hit Ctrl + F5 or F5 in Visual Studio and everything should now work.

alasvant commented 6 years ago

Tested this also on another machine Visual Studio 2017 and SQL Server 2014 Express (with LocalDB). By default the sqllocaldb command is used from 2014 version so need to be in 2016 version binn folder as stated above workaround. Using the above and happy joy joy when hitting F5 or Ctrl + F5 ;)

valdisiljuconoks commented 6 years ago

it's great to have resource for resolutions, but not sure whether db issues should be part of the solution description. prerequisites - for sure.

alasvant commented 6 years ago

Valdis, maybe you misunderstood me. What I mean add info about LocalDB version to requirements and then have known issues/workarounds for example on GitHub wiki page.

valdisiljuconoks commented 6 years ago

then of course old guy misunderstood you ;)