Skip to content

Microsoft.Build.Sql project build emits duplicate error reference #773

@tn-5

Description

@tn-5
  • Microsoft.Build.Sql version: 2.1.0
  • .net core & windows platforms

Steps to Reproduce:

  1. Install msbuild templates
  2. Create new blank project (dotnet new sqlproj)
  3. Add test file aa.sql (with an error), such as:
create table aa
(x int, y int)
go

create proc zz 
as
begin
   select z from aa
end
  1. Build with dotnet build

Expected output:
aa.sql(10,11): Build error SQL71501: Procedure: [dbo].[zz] has an unresolved reference to object [dbo].[aa].[z].

Actual output:
aa.sql(10,11,10,11): Build error SQL71501: Procedure: [dbo].[zz] has an unresolved reference to object [dbo].[aa].[z].

The error line and column are repeated. This leads to issues in VS Code for example when clicking on the output. It cannot locate the error position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions