eNeRGy164 / LivingDocumentation

Generate documentation based on your dotnet source code!
MIT License
54 stars 8 forks source link

Cannot analyse solution #37

Closed smeulend closed 3 years ago

smeulend commented 3 years ago

I Guess that this needs to be more robust. Rather skip something than not doing anything

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at LivingDocumentation.Program.<>c.b8_3(IPackageReference pr) in /home/vsts/work/1/s/src/LivingDocumentation.Analyzer/Program.cs:line 63 at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate) at LivingDocumentation.Program.<>c__DisplayClass8_0.b1(Project p) in /home/vsts/work/1/s/src/LivingDocumentation.Analyzer/Program.cs:line 63 at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at LivingDocumentation.Program.AnalyzeSolutionAsync(IList1 types, String solutionFile) in /home/vsts/work/1/s/src/LivingDocumentation.Analyzer/Program.cs:line 65 at LivingDocumentation.Program.RunApplicationAsync(Options options) in /home/vsts/work/1/s/src/LivingDocumentation.Analyzer/Program.cs:line 38 at LivingDocumentation.Program.Main(String[] args) in /home/vsts/work/1/s/src/LivingDocumentation.Analyzer/Program.cs:line 25 at LivingDocumentation.Program.

(String[] args)

smeulend commented 3 years ago

It seems that the PackageReference Name can be null

eNeRGy164 commented 3 years ago

Do you have a sample to recreate this?

eNeRGy164 commented 3 years ago

In your project, it fails because of this construct:

<ItemGroup>
    <PackageReference Update="Microsoft.NETCore.App" Version="2.1.0" />
</ItemGroup>

This is not picked up by Buildalyzer. It expects only Include as a property to get the name.