We have a quite mature C# codebase that is tightly coupled to a third party package. I would like to gradually remove this package, which will involve replacing/rewriting a lot of code over a period of months, of not years.
I’d like to start by measuring this dependency every time we build in Azure DevOps, and gather reports on the hopefully steadily decreasing number.
Does anyone know an easy way for me to do this? A simple approach could be to do a text search on the source code for all instances of the using OtherVendor.TheirAssembly;
directive, but that will only give me a count of dependent source files, and I’d rather measure each line of code that references the third party assembly. That way we can track progress even if we are improving several, but not all, lines of code in a file.
It seems NDepend can perhaps do exactly this, and a lot more, but we are a small team with a tiny budget that doesn’t need all the other NDepend functionality. I would love to find a script or lightweight open source tool that we could slot into the build pipeline to give us this metric.