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

311
Visualizações
Feature 'using declarations' is not available in C# 7.3. Please use language version 8.0 or greater - Error on one machine but works on another

When using Visual Studio Enterprise 16.3.7 on two separate machines one builds fine and the other machine throws the error:

Feature 'using declarations' is not available in C# 7.3. Please use language version 8.0 or greater.

enter image description here

enter image description here

This can easily be solved on the none working machine by setting LangVersion in .csproj as suggested here https://stackoverflow.com/a/48085575/3850405 or let Visual Studio automatically fix it like the print screen above.

<LangVersion>8.0</LangVersion>

What I can't understand is why one machine builds fine without this line in .csproj and the other machine needs it?

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

0

I received the same error, but I had simply forgotten to include the

<LangVersion>8.0</LangVersion>

attribute in ALL the .csproj files in the solution. The following is my current c# 8 setup:

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <LangVersion>8.0</LangVersion>
    <Nullable>enable</Nullable>
    <NullableContextOptions>enable</NullableContextOptions>
  </PropertyGroup>

I found the following documents to be the most helpful when migrating from core 2.2 to 3.x:

MSDN 2.2 -> 3.0

MSDN 3.0 -> 3.1

over 4 years ago · Santiago Trujillo Relatório

0

I had to update Visual Studio to version from 16.3.X to 16.4.2. This resolved the problem and I didn't have to add any LangVersion.

Credits: https://github.com/aspnet/AspNetCore.Docs/issues/16047

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