Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

479
Vistas
C# - Use of wildcards inside csproj file and new files addition

Inside .csproj files Visual Studio and Xamarin Studio as default keep a reference to every file used inside the project.

<ItemGroup>
    <Compile Include="Utils\Foo1Utils.cs" />
    <Compile Include="Utils\Foo2Utils.cs" />
    <Compile Include="Services\FooService.cs" />
    ...
</ItemGroup>

To avoid conflicts on csproj files inside our solution at every file addition, we started to use wildcards:

<ItemGroup>
    <Compile Include="Utils\*.cs" />
    <Compile Include="Services\*.cs" />
    ...
</ItemGroup>

The problem is that apparently both on Visual Studio and Xamarin Studio is not possible to "explain" to the IDE that we are using wildcards, and when we add a new file to the project they add a new reference to the file ignoring the wildcard *.cs on the folder. It's still a good solution because we don't need to commit our .csproj at every file addition, but now we have to reset them each time... anyone knows if there is a solution?

EDIT: with Rider (JetBrains) there isn't this problem, if in the csproj there is a wildcard and I add a new file everything works fine.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

If you use the new format for projects (.net core 2) it will use wildcard includes without you having to specify it for files in the project folder. You can manually set the target framework in order to still compile to whatever target you want.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda