0

I have a ASP.NET project that consists of many C# libraries in addition to the web project. The problem (for some reason) is that all projects that make up the web application are NOT added into one solution within a same visual studio. Instead, most projects are separated within individual visual studio. All projects are stored in source control, and shared by other developers.

Thus, the question is that how to find usage of any code, like "Find Usage" via Resharper. Is there any tools or tricks that allows me to do that like Resharper's Find Usage.

Any advice?

Pingpong
  • 7,681
  • 21
  • 83
  • 209

2 Answers2

0

It looks like you're in something of a bind. My suggestion would be to simply make your own source control branch, and in that branch, you can create a new SLN file, add all of the projects, replace their binary project references by project references and then call Find Usages. Then, if you need to do any changes on the basis of Find Usage info, simply merge those in without merging PROJ or SLN files.

Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
  • That would be my last resort if there is no other options. Because I need to keep my own version synchronised with the original one. If I do need to do that, I will consider writing a program to convert that, if it is possible. – Pingpong Apr 18 '14 at 06:51
0

If these library projects are referenced as DLL files rather than the project references the only way is to open all the one-project solutions and search there by 'text'. There are some tips/tricks, which could simplify navigation a bit.

P.S. The situation you described looks far from convenient. I agree with Dmitri - you might consider to discuss with your team to switch onto referencing projects rather than using binaries. Once you switch each developer will be able to create local either solutions with the projects involved, or maybe you will agree on new common source controlled solutions.

Dmitry Pavlov
  • 30,789
  • 8
  • 97
  • 121
  • I consider to create a local version of the VS solution that adds and loads all required projects. Plus, I want to automate it via a C# console app if there are APIs available for that, e.g. like a web crawler. But it depends on the availability of APIs from VS. – Pingpong Apr 18 '14 at 22:17
  • You could try also the following trick to be able to switch between the project references and references to compiled binaries. To do that - just create 2 configurations in your solution and name them e.g. 'PROJECT_REFS' and 'BINARY_REFS' (like you have standard ones: 'RELEASE' and 'DEBUG'). Check these links: http://whathecode.wordpress.com/2012/10/07/conditional-project-or-library-reference-in-visual-studio/ http://stackoverflow.com/questions/1786917/is-there-a-way-to-specify-assembly-references-based-on-build-configuration-in-vi – Dmitry Pavlov Apr 20 '14 at 09:23
  • With the project references you should be able to use Find Usages. And references to compiled binaries could be useful to check that binaries are up-to-date, etc.. – Dmitry Pavlov Apr 20 '14 at 09:24