Click here to Skip to main content
15,891,372 members
Articles / Programming Languages / C#

Visualizing Project Dependencies Automatically

Rate me:
Please Sign up or sign in to vote.
4.09/5 (11 votes)
4 Sep 2007CPOL3 min read 43K   428   32  
Have a large code tree? Wondering which projects refer to which other ones? Manually run this console app, schedule it to run nightly or after each build.
using System;
using System.Collections.Generic;
using System.Text;

using NUnit.Framework;
using CompanyName.DependencyTracker;

namespace TestDependencyFinder
{
    [TestFixture]
    public class TestProject
    {
        [Test]
        [ExpectedException(typeof(System.IO.FileNotFoundException))]
        public void TestNotFound()
        {
            new Project(@"C:\sdf.csproj");
        }

        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void TestNotAProject()
        {
            new Project(@"..\..\TestProject.cs");
        }

        [Test]
        public void TestOneFound()
        {
            Project project = new Project(@"..\..\Test.csproj");

            Assert.AreEqual("Test", project.Name);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
I've been a software developer since 1996 and have enjoyed C# since 2003. I have a Bachelor's degree in Computer Science and for some reason, a Master's degree in Business Administration. I currently do software development contracting/consulting.

Comments and Discussions