Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

274
Vistas
How do I quickly make changes to custom libraries that generate and consume NuGet packages?

My question is similar to this one. I have a solution, A, which contains projects B and C:

A
|-B  ---> B.nupkg
|          ^
|-C  ------|

In the past, C used a project reference to B. Now, I've converted B so that it generates a NuGet package when I build (<GeneratePackageOnBuild>true</GeneratePackageOnBuild> in B.csproj), and I reference this in C. I do this because many consumers only want B but not C.

So now if I want to make a change to B and debug it, I have to do the following:

  1. Build the solution
  2. Copy B.nupkg from bin\Debug to a central location
  3. Rebuild the solution again (and possibly clear my NuGet caches)
  4. Run

In past, with project references, all I had to do was build and run after chaning B and I could step through my newly changed code. How do I get back to the one-click process I had before with project references? Is there a way to use project references in Debug mode and NuGet packages in Release mode?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It sounds like the projects B and C are in the same (or near-enough) location and solution (A); in that case, you're over-complicating this hugely.

Inside the solution, just use project references between B and C (in whichever direction you require). That's absolutely fine and expected - you can debug, build etc B and C together, and everything will work fine, without having to copy anything around during development. When you're ready to do a deployment for other consumers (either locally or via CI), just build everything together, making sure that both B and C are configured to generate NuGet packages (it sounds like you've already done this), and upload/copy both NuGet packages to your NuGet store, at the same time.

In the output nupkg files, the project references will be translated to NuGet package references automatically; you don't need to do anything.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda