Trying to convert PackageReference back to ProjectReference for local development .... struggling
I'm trying to do as the title says with the aim of having faster development, that's basically it. Our current processes of deploying nuget packages via a pipeline or locally are slow.
What I'm doing is this:
-
I have a script which finds all internal nuget packages referenced via PackageReference.
-
For each of these we do something like this:
<ItemGroup Condition="@(PackageReference->AnyHaveMetadataValue('Identity', 'PACKAGE')) == 'true'"> <PackageReference Remove="PACKAGE" /> <ProjectReference Include="/home/OtherRepo/PACKAGE.csproj" /> </ItemGroup> -
I seemingly also have to specify the PackageVersion even though we've removed the package. (I've looked into this but it doesn't help:
CentralPackageTransitivePinningEnabled)
The issue is that our libraries depend on other libraries. This means that if you locally reference LibA which LibB also uses, then at runtime loading a dll from LibB can result in a DLL not found exception.
This means what initially was quite a small change is turning into "Download every repo and make sure every internal depdency is resolved by path and not nuget".
This has a secondary problem in that LibB might have some unreleased breaking changes which I must then go fix .... it's really beginning to snowball into something unsustainable.
Has anyone tried this before, and do you have any suggestions?
Posted Mar 14, 2026, 12:26 AM UTC