This example shows how to create an analyser that forces the ending of a class that implements a specific interface. The project is not optimised. It is a simple example.
The solution builds several nuget packages that are used in projects in this solution.
- Create a folder for NuGet packages.
- Create a new nuget source with source of the new folder.
- Build the CommandHandlerAttributes project.
- Copy nuget into nuget folder.
- Build the project CommandHandlerAnalyser.Package.
- Copy nuget into nuget folder.
- Build the CommandHandlerInterfaces project.
- Copy nuget into nuget folder.
- Build the project CommandHandlerSample. This should now fail due to the analyser.
If you have problems, restart Visual studio.