I recently set up Redgate’s SQL Change Automation in Visual Studio 2017, and I ran into a confusing error when I started trying to use it. For any other folks out there searching on “Unknown SQL Server Platform,” here’s how I got past it.
Spoiler: Visual Studio suggested updating Microsoft’s SQL Server Data Tools, which failed for me and wasted a lot of time. Updating Visual Studio did fix my issue.
The basics on my setup
When I installed Visual Studio 2017, I selected the ‘Data storage and processing’ workload, which contains SQL Server Data tools as well as some of the Redgate tools:
Visual Studio 2017 workloads
I used the default checkboxes on the right there, installing everything except F# desktop language support.
First, I created a new project
In the ‘SQL Change Automation’ window, I clicked ‘Create Project’, selected ‘SQL Change Automation Project’ and gave it a name, and click OK. This launched the wizard to set up the project.
I clicked ‘Get Started’, and proceeded to the step to configure my connections.
At this point, I was prompted to specify my development database and deployment target. I chose two databases on my local SQL Server 2017 instance.
I clicked ‘Next’, and that’s where things got wacky.
Unknown SQL Server Platform - The target platform for this project is not supported by the installed SQL Server tools.
When I proceeded past this point and had SQL Change Automation create my baseline, it stopped pretty quickly and I saw a message…
When I clicked on the blue link, I was taken to a download for the most recent version of Microsoft’s SQL Server Data Tools.
After I carefully read the page and made sure I didn’t have Visual Studio extensions installed that would cause a problem, I attempted to update the SQL Server Data Tools and found that installation ran for 7-10 minutes, then failed with an “incorrect function” error.
I restarted Windows. I tried updating again. Same failure.
What fixed this for me: updating Visual Studio
I went into the ‘Help’ menu in Visual Studio to capture the version numbers of my extensions (that’s under Help -> About Microsoft Visual Studio), and that’s when I realized: I should probably update Visual Studio before I wasted any more time chasing this error.
After I opened “Check for Updates,” I saw that there was a bunch of stuff that Visual Studio wanted to fix. I told it to apply those changes (it really wasn’t clear what the changes were, I just let it run), and then….
Everything worked after that
Yep, everything was fine. I still had the exact same version of SQL Server Data Tools as before (15.1.61808.07020, for the record), but Visual Studio was now happy to use it, for whatever reason.
I was able to complete my baseline and get on with my day.
I should really know better…
Microsoft has changed a lot in the last few years, but one truth that remains eternal is “always check for patches before you start to use a fresh install.”