Skip to main content
Fix invalid link. Improve wording. Add a comma.
Source Link

By now, there is a specific analyzer available especiallyspecifically for such a task: https://github.com/DotNetAnalyzers/BannedApiAnalyzer

You have to define a ruleset in BannedSymbols.txtBannedSymbols.txt. In your case, BannedSymbols.txt would contain something like

M:Microsoft.SharePoint.SPListItemCollection.GetItemById(System.Int32);Potential performance problems
T:System.Net.Mail.SmtpClient;Use OurCompany.FancyClient instead 

During compilation, you would then get warning messages Screenshot of error message

By now, there is a specific analyzer available especially for such a task: https://github.com/DotNetAnalyzers/BannedApiAnalyzer

You have to define a ruleset in BannedSymbols.txt. In your case, BannedSymbols.txt would contain something like

M:Microsoft.SharePoint.SPListItemCollection.GetItemById(System.Int32);Potential performance problems
T:System.Net.Mail.SmtpClient;Use OurCompany.FancyClient instead 

During compilation you would then get warning messages Screenshot of error message

By now, there is a specific analyzer available specifically for such a task: https://github.com/DotNetAnalyzers/BannedApiAnalyzer

You have to define a ruleset in BannedSymbols.txt. In your case, BannedSymbols.txt would contain something like

M:Microsoft.SharePoint.SPListItemCollection.GetItemById(System.Int32);Potential performance problems
T:System.Net.Mail.SmtpClient;Use OurCompany.FancyClient instead 

During compilation, you would then get warning messages Screenshot of error message

Source Link

By now, there is a specific analyzer available especially for such a task: https://github.com/DotNetAnalyzers/BannedApiAnalyzer

You have to define a ruleset in BannedSymbols.txt. In your case, BannedSymbols.txt would contain something like

M:Microsoft.SharePoint.SPListItemCollection.GetItemById(System.Int32);Potential performance problems
T:System.Net.Mail.SmtpClient;Use OurCompany.FancyClient instead 

During compilation you would then get warning messages Screenshot of error message