How to temporarily replace a NuGet reference with a local build

I found the following workaround useful for me:

First I disable “NuGet Package Restore” from the context menu of the Solution.

After that I go to the %HOMEPATH%\.nuget\packages folder, and search for the package I want to replace. From this package I take the version number, and use this exact version number to build the dll I want to exchange.

After that I can exchange the dll in the packages folder with this newly built dll. Building the project now uses this new dll.

After having this set up once, I can easily build new dlls, and copy them to the packages folder.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)