Is there any way that in project level I can define rule set that give me compile time error while using some properties? Like In my project i want to enforced that No one should use DateTime.Now . IF some one use it , project should be give compile time error.
I am using Dot net 6 Minimal API project and using Visual studio 2022. (I also have license of resharper, please provide solution if possible via Resharper)