microsoft / microsoft/DacFx

Visual Studio not catching SQL Server 2016 Version Errors

Open
#835 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: scriptdom bug
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

  • SqlPackage or DacFx Version: The included with VS 2026
  • .NET Framework (Windows-only) or .NET Core: .NET Framework
  • Environment (local platform and source/target platforms): VS 2026, SQL Server 2017 (attempting to set target to 2016 version)

Steps to Reproduce:
With a SQL Server Database Project, I was hoping I could use VS to validate database code to specific SQL Server versions. I’m running VS 2026, 18.8.2.

The project properties can set the Target Platform.

Image

After importing the database, it does a nice job to find errors such as references to missing columns that SSMS doesn’t even catch. That’s fantastic.

However, the Target Platform doesn’t seem to work. I tested a stored procedure with the TRANSLATE and TRIM commands that were introduced in SQL Server 2017. I was expecting that would appear on the Error List, but it doesn’t. Nor does it trigger an error with a Rebuild. Is this WAD or a bug?

I didn’t check other SQL Server versions. Do I need to go back to an older version of VS to test for post-2016 code?

Did this occur in prior versions? If not - which version(s) did it work in?

I am unsure if this impacts other versions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SQL Server Database Project target-platform setting in Visual Studio and reproduce the issue using stored procedures containing TRANSLATE and TRIM while targeting SQL Server 2016. Compare Error List and Rebuild results; done means confirming whether these SQL Server 2017 commands are reported as incompatible or documenting that the behavior is expected. The payload names no repository files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.