Search code examples
c#visual-studio.net-coreprojectabcpdf

Unexpected csproj itemgroup/NativeLibs Remove entry on file rename


I am getting an unexpected ItemGroup entry for each rename.

If I start with interface public interface IDoStuff and rename it to IDoStuffRename I get this in my csproj on save:

<ItemGroup>
   <NativeLibs Remove="IDoStuffRename.cs" />
</ItemGroup>

It does not happen on delete or move. This heavily pollutes the csproj file over time after continuous refactoring.

Any idea why this is happening and how I can avoid that extra entry?

I currently undo it manually.


Solution

  • Confirmed, it's indeed nuget package ABCPdf that's causing this behavior. I can repeatably reproduce it by adding the package (or not). I get it on a dotnet core solution with version 11x and 12x.

    Manually removing these references for now.

    PS: If someone can elaborate what NativeLibs Remove means for the build I would appreciate it.