Replies: 9 comments 2 replies
-
Analyzers are supposed to be TFM-agnostic. Can you clarify what problems do you face? |
Beta Was this translation helpful? Give feedback.
-
You may also consider starting from https://github.com/jmarolf/analyzer-start. |
Beta Was this translation helpful? Give feedback.
-
After using Nuget Manage... and adding the analyzer, the analyzer dlls are not even shown in the dependencies tree of .NET Framework class library project. For .NET standard and Core the analyzer dlls are listed. |
Beta Was this translation helpful? Give feedback.
-
It may be easier to investigate if you share a repro project, or if you can try start from the linked repo above and see if it's working for you. If it does work, then you can start comparing it with your project. |
Beta Was this translation helpful? Give feedback.
-
I am not allowed to share source code.
|
Beta Was this translation helpful? Give feedback.
-
You can use the template in Visual Studio: |
Beta Was this translation helpful? Give feedback.
-
I used the template to start with. I don´t think I did something off track. |
Beta Was this translation helpful? Give feedback.
-
It appears to work with migrated sdk projects: |
Beta Was this translation helpful? Give feedback.
-
Still looking for a sample 4.8 C# project/solution that will run the built-in Rosyln analyzers.... (which is what the original title of this discussion was). No matter how bad I write code (deliberately) I do not get any warnings [and ideally the ability to treat them as errors]. |
Beta Was this translation helpful? Give feedback.
-
I am writing a Roslyn Analyzer to help my colleagues to squeeze out systematically what I perceive as a bad practice. The analyzer and also some fixes work when configured to be used in a .NET Core library. However I did not succeed to configure a .NET Framework library to get analyzed. I also find questions like the following
https://stackoverflow.com/questions/67634772/using-roslyn-in-a-net-4-8-library-project-reference
https://github.com/login?return_to=%2Fdotnet%2Froslyn%2Fissues%2F50612
I am wondering whether this is actually supported or not, and what options there are to address that. One optio might be to switch to .NET Standard libraries, but that appears to be hard either.
Thanks, Joachim
Beta Was this translation helpful? Give feedback.
All reactions