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

556
Visualizações
'Could not load type 'Microsoft.Extensions.Primitives.InplaceStringBuilder' from assembly 'Microsoft.Extensions.Primitives

I am working on an ASP.NET Core v2.1 Razor Pages project in which I am working on implementing Auth0 for user authentication. After setting everything up, I attempted to build my project and am getting the following exception:

System.TypeLoadException: 'Could not load type 'Microsoft.Extensions.Primitives.InplaceStringBuilder' 
from assembly 'Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, 
PublicKeyToken=adb9793829ddae60'.'

In order to set up Auth0, I had to install the Microsoft.Extensions.Primitives nuget package. However, when trying to build my project, this is the error I get. If I remove the package, when I try and build the project, I get the following error:

Version conflict detected for Microsoft.Extensions.Primitives. Install/reference 
Microsoft.Extensions.Primitives 5.0.0 directly to your project to resolve this issue.

The following code is where the exception is being thrown:

public class Program
{
    public static void Main(string[] args)
    {
        CreateWebHostBuilder(args).Build().Run();
    }

    public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
            .UseStartup<Startup>();
}

I have read that InplaceStringBuilder does not exist in Microsoft.Extensions.Primitives anymore so I am assuming this is causing the problem. However, I don't see InplaceStringBuilder being used anywhere so I can't seem to figure out what it is even needed for.

Does anyone know a way to resolve this issue?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Probably you have some package that uses Microsoft.Extensions.Primitives on Version >= 5.0.0

I had a similar problem a few days ago. In my scenario, I was working on an ASP.NET Core v2.1 WEB API and a dependency with a project that was using the package Microsoft.Extensions.Configuration.Abstractions on Version="5.0.0" caused the problem. I was able to solve the problem by downgrading that package from Version 5.0.0 to Version 2.1.0.

over 4 years ago · Santiago Trujillo Relatório
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