Upgrading from MSbuild 2015 to 2017 fails on __MigrationLog table
martin_castaldo
Posts: 2 New member
in ReadyRoll
Hey,
We have recently took the scary but needed step of upgrading from msbuild 2015 to 2017 and encounter the following error:
N'The ReadyRoll [dbo].[__MigrationLog] table has an incorrect primary key specification. This may be due to the fact that the <ReadyRollToolsVersion/> element in your .sqlproj file contains the wrong version number for your database. Please check earlier versions of your .sqlproj file to determine what is the appropriate version for your database (likely 1.3.1).
If we wanted to upgrade to the latest version how would we do that?
Thanks,
Martin
We have recently took the scary but needed step of upgrading from msbuild 2015 to 2017 and encounter the following error:
N'The ReadyRoll [dbo].[__MigrationLog] table has an incorrect primary key specification. This may be due to the fact that the <ReadyRollToolsVersion/> element in your .sqlproj file contains the wrong version number for your database. Please check earlier versions of your .sqlproj file to determine what is the appropriate version for your database (likely 1.3.1).
If we wanted to upgrade to the latest version how would we do that?
Thanks,
Martin
Tagged:
Answers
Sorry to hear you've run into a problem with upgrading your builds. Hopefully this should be a straightforward fix to the project file, although it's also possible we'll need to supply you with a script to upgrade your database's [__MigrationLog] table (and associated objects). But in order to determine this, there's just a few little things I need:
- Do you know which version of ReadyRoll was being used before the upgrade? Are you using the latest version now? (the build log should indicate the version number)
- Is there a <ReadyRollToolsVersion> value present in the sqlproj file?
- Can you please script out the CREATE TABLE statement for the [__MigrationLog] table (e.g. using SSMS) so we can confirm that our upgrade script will resolve the issue
Thanks in advance and any questions please let me know.Product Manager
Redgate Software
All we did was upgrade our build tools from 2015 to 2017 and it seems to have caused this issue. Looking at the readyroll script created.
When using VS2015 the readyroll output version is 1.10.0.719
When using VS2017 the readyroll output version is 1.16.18018.7798
Even thought we are using 1.11 as the version within the project.
Any ideas?
Thanks,
Martin
The reason why the version differs between VS2015 and VS2017 is because ReadyRoll installs into a different part of the machine for each version/instance of Visual Studio (whereas in VS2015 and earlier, it would always install into C:\Program Files (x86)\MSBuild\ReadyRoll). This is to support the convention of multiple IDE instances introduced in VS2017.
Unfortunately 1.10/1.11 is not supported on VS2017 so if you'd like to upgrade the build tools then the problem with the MigrationLog table will need to be addressed. If you're able to script out and send me (via private message if you like) the design of the table per my earlier response, I can assist with providing a script to fix the issue.
In terms of why 1.10 isn't being used, unfortunately it will be difficult to determine this without seeing the design of the project/solution. However you may want to check your sqlproj configuration against these steps in the documentation:
Installation > Build components > Option C – Use the ReadyRoll.MSBuild NuGet package
Product Manager
Redgate Software