GithubHelp home page GithubHelp logo

oskar / dotnet-overview Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 52 KB

A .NET Core global tool to display a simple overview of all projects in a directory, with information such as target framework.

License: MIT License

C# 95.11% Dockerfile 3.68% Shell 1.21%

dotnet-overview's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dotnet-overview's Issues

Console app crashes when no csproj files are found

$ dotnet run --project ../DotNetOverview.Console/

Unhandled Exception: System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
   at DotNetOverview.Console.Program.PrintStatistics(IEnumerable`1 projects) in /Users/oskar/git/dotnet-overview/DotNetOverview.Console/Program.cs:line 27
   at DotNetOverview.Console.Program.Main(String[] args) in /Users/oskar/git/dotnet-overview/DotNetOverview.Console/Program.cs:line 18

Handle access denied exceptions nicer

Oskars-MBP:~ oskar$ dotnet overview
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/Users/oskar/.Trash' is denied.
 ---> System.IO.IOException: Operation not permitted
   --- End of inner exception stack trace ---
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1.DequeueNextDirectory()
   at System.IO.Enumeration.FileSystemEnumerator`1.DirectoryFinished()
   at System.IO.Enumeration.FileSystemEnumerator`1.FindNextEntry(Byte* entryBufferPtr, Int32 bufferLength)
   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern, EnumerationOptions enumerationOptions)
   at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
   at DotNetOverview.Program.OnExecute() in /home/runner/work/dotnet-overview/dotnet-overview/src/Program.cs:line 60
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.Invoke(MethodInfo method, Object instance, Object[] arguments)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context, CancellationToken cancellationToken)
   at DotNetOverview.Program.<Main>(String[] args)

Make console app runnable through Docker

The working directory from which the docker container is started has to be shared with the container, otherwise no csproj files will ever be found inside the container.

Crashes on non-existing directory

$ dotnet-overview nonexistingpath

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path '/Users/oskar/git/dotnet-overview/nonexistingpath'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options)
   at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options)```

Test suite

Gather lots of csproj files from public GitHub repos and run the tool on them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.