Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

395
Visualizações
dotnet ef force me to have connectionString in appsettings.Development.json

I always had connectionString in following files: appsettings.json and appsettings.Development.json. But then I realized. It's enough to have it one place - appsettings.json. Because it's replaced in CI builds anyway. So I removed it from there and application is still working fine.

But then I was trying to update database with command dotnet ef database update --Context AppIdentityDbContext and it turned out that i cannot because dotnet cannot find connection string

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: Could not find a connection string named 'Identity'.

So now I'm forced again to revert that connection string in appsettings.Development.json.

Is there anyway to get rid of it that connectionString from that file. I don't see any reason to keep in two places, just because of that minor reason.

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda