devlooped / nugetizer

A simple to understand packing model for authoring NuGet packages
https://clarius.org/nugetizer/
MIT License
258 stars 7 forks source link

'NuGetizer.SponsorLinker' exception happening randomly #370

Closed Aleksanderis closed 1 year ago

Aleksanderis commented 1 year ago

Describe the Bug

With latest version (1.0.1) there is an exception happening during dotnet pack:

CSC : error AD0001: Analyzer 'NuGetizer.SponsorLinker' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null. (Parameter 'path2')'. [C:\Projects\ProjectX\ProjectX.csproj]

It happens not always, but quite often. I have 5 packable projects in the solution and some of them are randomly not packaged. I need to repeat dotnet pack several times until everything passed correctly.

Version Info

Currently latest version - 1.0.1

kzu commented 1 year ago

Hm... that should not be happening at all, ever. That said, I've updated the SponsorLink dependency a bit and nugetizer is a bit lagging. I'll ship an update with an updated dependency.

Could perhaps mention what IDE/editor you're using when this happens?

(I think from another report of yours, that you might be using Rider...)

Thanks!

Aleksanderis commented 1 year ago

I'm using Rider, but it happens outside IDE. I'm just running dotnet pack on solution level. It then packs all projects in solution which are packable (<IsPackable>true</IsPackable>).

kzu commented 1 year ago

Gotcha. Outside an IDE, nothing should be running. Will double check!

kzu commented 1 year ago

v1.0.2 shoud have the fix. Thanks for reporting!