Closed smeulend closed 3 years ago
It seems that the PackageReference Name can be null
Do you have a sample to recreate this?
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.
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](IEnumerableb 1(Project p) in /home/vsts/work/1/s/src/LivingDocumentation.Analyzer/Program.cs:line 63
at System.Linq.Enumerable.WhereEnumerableIterator(String[] args)
1 source, Func
2 predicate) at LivingDocumentation.Program.<>c__DisplayClass8_0.1.MoveNext() at LivingDocumentation.Program.AnalyzeSolutionAsync(IList
1 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.