Skip to main content

Command Palette

Search for a command to run...

Converting Package References to Project References

Convert-To-ProjectReferences.ps1

Published
1 min read
Converting Package References to Project References
J

I am a developer in Seattle with interests in Security (cyber and IRL), machine learning, and distributed systems.

Had to make some debugging code changes in some common libraries. Normally these built and published as nuget packages which we reference as PackageReference. Waiting for the CI/CD and references pre-released versions slows down the dev loop. Instead, we can add them to the solution with the projects that consume the common libraries as ProjectReference temporarily.

This PowerShell script will take in a solution path and local paths for which the common libraries exist. It will add them to the solution and update the solution projects by replacing the PackageReference with the corresponding ProjectReference.

References