MSBuild linter
See original GitHub issueMSBuild could have an opt-in mode that would apply rules and heuristics to give suggestions about project “health”.
Possible warnings:
- You have something that is almost an item transform but not well formed so falls back to string (like
@(I->'%(Identity))with a missing closing'). - You have referred to a property that is not defined and it expanded to the empty string.
- You have referred to a property that is not defined, but an item of the same name is defined.
- You have referred to an item that is not defined, but a property of the same name is defined.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Is there a lint-like tool for MSBuild?
Is there a tool that can check an MSBuild file for internal consistency and highlight missing configurations along the lines of "your project ......
Read more >MSBuild linter · Issue #1777
MSBuild could have an opt-in mode that would apply rules and heuristics to give suggestions about project "health". Possible warnings:.
Read more >FSharpLint | Setup MSBuild Task
Setup MSBuild Task. FSharpLint can be run as an MSBuild task; this will result in lint warnings showing up in your IDE (Visual...
Read more >What is the best linter for C#? : r/dotnet
42 votes, 41 comments. I'm looking for something to standardize code formatting in a few projects (ASP.NET Core and some console apps).
Read more >Use MSBuild to convert Bicep to JSON - Azure
This article describes how to use MSBuild to convert a Bicep file to Azure Resource Manager template (ARM template) JSON.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

My favorite linter rule would be to catch
ItemGroups with wildcards that scan the entire drive:Where
SomePropertyresolves to empty sting.We had an interesting issue today in our team, where:
Broke Publishing, and was not trivial what was happening, until we remembered that ProjectReference mapped to MsBuild task and removed the Properties delegated trough, removing the TargetFramework.
Interesting case as well for a linter warning, suggest to use AdditinalProperties instead