Treat CodeAnalysis Errors as Build errors, not IntelliSense
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
**Is your feature request related to a problem? Please describe.**
I'm very happy to have a new parameter for SqlCodeAnalysis task, where we can specify a custom path to locate our custom rules DLLs, `SqlCodeAnalysisAssemblyPaths` and I think it's amazing how it works.
But all the errors now are *not* being thrown as build errors in my case, but as IntelliSense errors, during VS build/rebuild command (`devenv.exe /build`)
This is a problem, because with previous versions of `Microsoft.Data.Tools.MSBuild` I could install the custom rules DDLs inside VS SQLDB DAC folder and it would throw code analysis errors as build errors, using `MSBuild` command line. Now, with the errors being thrown as IntelliSense errors, I cannot use `msbuild` command line anymore to validate my solution.
**Describe the solution you'd like**
Code Analysis rules errors to be thrown as build errors, not IntelliSense errors.
**Describe alternatives you've considered**
Using older versions of DataTools + DacFx does the trick, but I'd like to use the more recent versions of DacFx and have the `SqlCodeAnalysisAssemblyPaths` parameter as an option for MSBuild.
**Additional context**
Contributor guide
Research direction
No source files or tests are named. Start by tracing the SqlCodeAnalysis task and how its diagnostics are classified during Visual Studio and command-line MSBuild builds; done means custom-rule violations are reported as build errors when validating the solution with MSBuild.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100