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

989
Visualizações
Error CS0104: 'Guid' is an ambiguous reference between 'System.Guid' and 'System.Guid'

On one of my projects I have enabled ImplicitUsings (C# 10) feature. The project is an Sdk project multi-targeting .NET 4.8 Framework and .NET 6. As of yesterday my builds started failing on Azure DevOps with the following error:

Error CS0104: 'Guid' is an ambiguous reference between 'System.Guid' and 'System.Guid'

Even a build of a previously known-good commit (day before yesterday) is now failing. The pipeline hasn't changed. Inspecting the agent's image yields the same version (20220207.1). The problem doesn't reproduce locally on the latest Visual Studio 2022 (17.1).

The problem occurs in files that include using System, such as EF Core migration files. I probably could resolve the problem by removing these "unused" usings, but the problem will reappear whenever a new migration is created. The generated usings (obj\Debug\net48\Project.GlobalUsings.g.cs) declare the following using global using global::System;. Using Guid in other files don't produce this error.

Update. The saga continues. I'm now also getting a build failure on a .NET 6 project referencing other .NET Standard 2 projects. The error lies in a generated source file (DragonFruit) with the line using System.Threading.Tasks. Builds fine locally, but fails on Azure DevOps with this error:

D:\a\1\s\XXX\obj\Debug\net6.0\XXX.g.cs(8,31): error CS0104: 'Task<>' is an ambiguous reference between 'System.Threading.Tasks.Task' and 'System.Threading.Tasks.Task' [D:\a\1\s\Source\XXX.csproj]

What could've changed that these usings are now causing build failures? And how can I resolve this warning without having the manually update the migrations?

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