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

416
Visualizações
Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzer threw an exception of type 'System.NullReferenceException'

I'm updating a package to .NET 5.0 from .Net Core 2.1. I've updated all the assemblies to the latest versions but am getting the error below from the Analyzer package:

enter image description here

This error occurs due to the inclusion of some other packages that were previously updated to .NET 5.0. The offending packages all include the following in their project file:

  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

This gives rise to 2 versions of Microsoft.AspNetCore.Mvc.Analyzers appearing in my project dependencies and hence I get the error.

Anyway short of updating all the packages to remove the need for them to include Microsoft.AspNetCore.App (beyond the scope of the current development) has anyone any suggestions of how to solve this issue? I'm under the assumption that it is fine to specify this FrameworkReference include in a .Net 5.0 project when it has dependencies on core libraries.

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

0

It turns out that way down in the dependency hierarchy there were some references hanging around referencing deprecated Microsoft.AspNetCore packages even though the package itself had been switched to target the .NET 5 framework.

enter image description here

I found the offending packages by looking at the dependencies in the Solution Explorer in VS.

I removed these and replaced them with the single Framework reference as seen below:

enter image description here

And Uncle Bob's your uncle it works now.

over 4 years ago · Santiago Trujillo Relatório

0

i upgrade .net 6 and i deleted this packages. no need these; delete them

        <!--<PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.2.0" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.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