You can view this post first to easier to understand my problem. When I use UseMvc() method without using Endpoint Routing, the visual studio show a warning message while I'm coding. I know how to solve the warning. But I want to know how we could make a warning like this, I wrote some libraries and I want other people use these libraries correctly, remind them while they are coding.
Asked
Active
Viewed 204 times
1
-
3This is a [Roslyn Analyzer](https://devblogs.microsoft.com/dotnet/how-to-write-a-roslyn-analyzer/), specifically [this one](https://github.com/dotnet/aspnetcore/blob/52eff90fbcfca39b7eb58baad597df6a99a542b0/src/Analyzers/Analyzers/src/UseMvcAnalyzer.cs) – canton7 Jun 09 '21 at 08:28
-
4canton beat me, but me too was thinking you may be looking for [Tutorial: Write your first analyzer and code fix](https://learn.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix) – Fildor Jun 09 '21 at 08:30
-
2Ah yeah, that's a better tutoria link @Fildor! – canton7 Jun 09 '21 at 08:31
-
Many thanks to you both. You save my day, man. – Alex Jun 09 '21 at 09:16