Closed ErikEJ closed 3 weeks ago
this might be a bug in SSDT instead of dacfx
@llali agree, it is related to how SSDT reports build results, not DacFX as such
While the bug surfaces in SSDT, it seems like its DacFx outputing build errors with the extra semicolon (between Warning: SR0016) on code analysis rules validation. That's a DacFx item I would suggest we keep for future improvement.
Looking forward.. Now, if only DacFX was open source 😅
I have a fix for this in DacFx. Here's the output from dotnet build generated from my test after the fix:
"StaticCodeAnalysis warning SR0001: Microsoft.Rules.Data : The shape of the result set produced by a SELECT * statement will change if the underlying table or view structure changes.", "StaticCodeAnalysis warning SR0016: Microsoft.Rules.Data : Stored procedure(sp_Procedure1) includes sp_ prefix in its name.", "warning SQL71502: Procedure: [dbo].[sp_Procedure1] has an unresolved reference to object [dbo].[InvalidTable]"
@llali Great news. I am surprised that DacFX actually generates the analysis output and nit SSDT. What is the timeline for the fix? VS 17.11??
@ErikEJ - yes, this change would first appear in a preview of a future (17.11) release of VS. I can't venture which preview just yet. :) As I'm sure you guessed, it will not appear in 17.10.
kudos @llali for pinning the message anomaly down in dacfx
This landed in https://www.nuget.org/packages/Microsoft.SqlServer.DacFx/162.3.557-preview, not positive which 17.11 preview this will hit yet.
fixed in 162.3
Build from a .sqlproj in VS 17.9.1:
=> Error list:
Build from some other tool:
=> Better error list (IMHO)
Seems to be cause by the multiple : signs here
Warning: : SR0016 :
Docs