Skip to content

pbrianmackey/DependencyAnalyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dependency Analyzer

Dependency Query tool for .NET. This tool helps you determine if a project references another project somewhere down the line. It is like a queryable database of references. This is useful for large projects where dependency diagrams can get complex on paper (gigantic UML diagrams per-se).

##Getting Started

  1. Make sure you install the dependencies listed below.
  2. Clone this repository to your computer. Let's call the place you cloned it "C:\CloneRoot"
  3. Open the command line and change directory to "C:\CloneRoot\ReferenceCreator"
  4. execute "rake 'reference[myProject,myProject2]'" (case sensitive!) and you will see "Yes a direct reference was found."

That's it! There's a simple lookup of a pretend project referencing another pretend project. Now you should run the executeable to generate a file that will lookup all your own projects. But first you need to tell the program where your solution files are located.

##Now that was easy. So let us setup your own environment

  1. Edit "C:\CloneRoot\ReferenceCreator\ExtractReferences.exe.config" with your solution paths E.G.:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup> 
      <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
  </startup>
 <appSettings>
  <add key="root" value="D:\Projects\"/><!--Optional.  Leave blank if you want to specify full paths or paths do not have a common root -->
  <add key="solutions" value="Path\to\Project\Project.sln,Path2\Project2.sln,And\So\On\blah.sln"/>
</appSettings>
</configuration>
  1. execute "rake generate" (no quotes). This creates the required Sample.pro (prolog file.) at "C:\CloneRoot\ReferenceCreator\Sample.pro". Overwrites original.
  2. execute "rake 'reference[myProject,myProject2]'" (where myProject is the Assembly name generated by your own .NET project.)

##Dependencies

  1. https://github.com/ruby/rake

Rake is used to run commands at the command line. This makes setup a lot easier.

  1. http://www.swi-prolog.org/

A Prolog interpreter. (Mac uers I recommend installing this program with homebrew: http://brew.sh/)

  • Edit "C:\CloneRoot\ReferenceCreator\Rakerile.rb" near the top to match your install location:
swiplLocation = '"D:\Program Files (x86)\swipl\bin\swipl.exe"' #(note the double quotes)

##Notes

  • Make root empty in the app.config if you don't have all your solutions in the same place. Specify full paths for each *.sln file:
<add key="root" value=""/>
<add key="solutions" value="C:\Path\to\Project\Project.sln,C:\Path2\Project2.sln,C:\And\So\On\blah.sln"/>
  • When running "rake 'reference[myProject,myProject2]'" do not use ".dll". Just the project's assembly name in ALL LOWER CASE. All project names are made lower case.
  • I recommend looking at the Sample.
  • A prolog file is generated by this program at: ReferenceCreator/Sample.pro. Regenerating this file overwrites the original.
  • Do not specify *.proj files in the solutions. Only solutions.

About

Dependency Query tool for .NET

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published