Copilot aka , GitHub Copilot en Visual Studio 2022 (GIT Azure Devops)

50 views
Skip to first unread message

Kiquenet

unread,
Mar 17, 2026, 7:20:06 AMMar 17
to AltNet-Hispano
Utilizan  Visual Studio 2022 y   .github/instructions/*.instructions.md ?
y también ?
.editorconfig for coding standards
CONTRIBUTING.md for best practices, guidelines, architectural standards, etc.
and README.md for high level project information


Getting Copilot to respond the way you want can be a challenge. You may have different coding standards, best practices, or architectural patterns in different areas of your codebase. With instruction files, you can now target specific instructions to specific folders or files in your repository, making Copilot truly project-aware and consistent across sessions.

Enable the feature
Turn on the feature at Tools > Options > GitHub > Copilot > Copilot Chat > Enable custom instructions to be loaded from .github/instructions/*.instructions.md files and added to requests.

Write instruction files
1. Format your instructions with the applyTo header and specify a glob pattern for which files you want these instructions to be included for.
 
---

applyTo: "src/**/*.cs"

---
2. In the file body, you can use natural language to specify your content and reference other instruction files to compose instructions together.
3. Save the file with the .instructions.md file extension in the root of your repository in the .github/instructions folder.

Tip: You can even get Copilot's help refining your instructions to be more detailed.
How it works

When you prompt Copilot, it will automatically detect which instruction files apply to the files in your current context and attach them as references. You can see which instructions were attached by clicking on the references in the response card.



Copilot memories

For Copilot to work effectively for your unique team and repository, it needs to learn about your project and team best practices. Copilot memories enable Copilot to understand and apply your project's specific coding standards, making it project-aware and consistent across sessions.

How Copilot memories work
Memories use intelligent detection to understand your team's preferences as you prompt in the chat. That means, as you prompt how you normally would, Copilot is looking for instances where you correct its behavior, explicitly indicate a standard, or ask it to remember something. When detected, you'll see a confirmation nudge to save the preference. Copilot will then categorize the preference into one of three files:

.editorconfig for coding standards
CONTRIBUTING.md for best practices, guidelines, architectural standards, etc.
and README.md for high level project information


So, as you prompt, you're not only teaching Copilot how to respond better to you in the future, but you're also helping out your team by documenting your development best practices, and augmenting their future Copilot responses as well!



Kiquenet

unread,
Mar 17, 2026, 8:48:12 AMMar 17
to AltNet-Hispano

When a preference is detected, you can choose where to save it:

  • User-level preferences: Saved to %USERPROFILE%/copilot-instructions.md. These preferences apply to all your Copilot sessions across projects.
  • Repo-level preferences: Saved to /.github/copilot-instructions.md. These preferences are shared with your team via the repository.

This approach lets you personalize Copilot for your own workflow while also establishing shared coding standards for your team.



Use a .github/copilot-instructions.md file

To use a .github/copilot-instructions.md file:

  1. Create/add a custom instructions file .github/copilot-instructions.md in the root of your repository.
  1. Enable the feature in Visual Studio from the Tools > Options pane. Expand the All Settings > GitHub > Copilot > Copilot Chat section and select the Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests checkbox.

Custom instructions aren't visible in the Chat view or inline chat. However, when used by Copilot, the.github/copilot-instructions.md file is listed in the References list of a response.

Copilot memories can automatically detect your preferences during chat and add them to your instruction files, so you don't have to write them manually.

Use user-level preferences

In addition to repo-level custom instructions, you can define user-level preferences that apply to all your Copilot sessions across projects. User-level preferences are saved to %USERPROFILE%/copilot-instructions.md.

Use user-level preferences for personal coding standards, preferred patterns, or workflow conventions that you want Copilot to follow regardless of the repository you're working in. Repo-level instructions in .github/copilot-instructions.md still apply alongside your user-level preferences, so your team's shared standards are also respected.

You can add preferences to this file manually, or let Copilot memories detect and save them automatically as you chat.

Use .instructions.md files

Instead of using a single instructions file that applies to all chat requests, you can create multiple *.instructions.md files that apply to specific file types or tasks. For example, you can create instructions files for different programming languages, frameworks, or project types.

To use a .github/instructions/*.instructions.md file:

  1. Create the .github/instructions directory if it does not already exist.

  2. Add one or more .github/instructions/*.instructions.md files.

  3. Add the applyTo property in the frontmatter section of the instructions file. Use glob syntax to specify what files or folders the instructions apply to.

  4. Enable the feature in Visual Studio.

    In the Tools > Options pane, expand the All Settings > GitHub > Copilot > Copilot Chat section and select the Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests checkbox.

Instructions file format

Targeted instruction files use the .instructions.md extension and have this structure:

  • Header (optional): YAML frontmatter
    • description: Description shown on hover in Chat view
    • applyTo: Glob pattern that matches the files or folders you want the instructions to apply to
  • Body: Instructions in Markdown format
Example

Here's an example C# custom instruction:

markdown
## C# Instructions --- applyTo: `**/*.cs` --- - Write clear and concise comments for each function. - Use PascalCase for component names, method names, and public members. - Use camelCase for private fields and local variables. - Add a newline before the opening curly brace of any code block (such as after `if`, `for`, `while`, `foreach`, `using`, `try`, etc.). - Ensure that the final `return` statement of a method is on its own line.

Copy these instructions into your .github/instructions/*.instructions.md file to use and automatically apply to Copilot behavior.

For more examples of custom instructions, see the list of instruction samples on GitHub.





Kiquenet

unread,
Mar 17, 2026, 10:47:53 AMMar 17
to AltNet-Hispano

🤖 [dotnet/skills para GitHub Copilot CLI]dotnet/skills para asistentes IA — Microsoft ha publicado los mismos skills que usa el propio equipo que desarrolla .NET. Gracias a ellos, optimizarás las respuestas de tus asistentes de IA con el conocimiento directo del equipo de .NET. Podrás resolver tareas complejas y errores de depuración de forma más fiable, reduciendo los intentos fallidos. Al integrar estas "habilidades" en tu entorno de trabajo, ganarás productividad aplicando patrones ya probados en escenarios reales de ingeniería. Muy, muy interesante.

Y si usas Azure, han publicado también los skills correspondientes.

Kiquenet

unread,
Mar 20, 2026, 3:44:14 AMMar 20
to AltNet-Hispano

¿Se pueden automatizar los settings de GitHub Copilot en Visual Studio 2022?

Sí. Los ajustes de Copilot en VS2022 pueden automatizarse usando tres mecanismos:

  • Git config local o global (git config --global github.copilot.*)
  • Archivo settings.json de Copilot (aunque Visual Studio es más restrictivo que VS Code)
  • Políticas corporativas mediante GPO o scripts PowerShell (si tu entorno lo permite)
  • Exportación/importación de settings de Visual Studio (limitado, no incluye todos los de Copilot)

Limitación real: Visual Studio no expone todos los checkboxes de Copilot a un archivo de configuración editable. La mayoría siguen estando solo en la UI.

Exportar settings de VS 2022: XML de configuración de GitHub Copilot para Visual Studio 2022

Recomiendan activar la opción “Sugerencias para la siguiente edición” o “Next Edit Suggestions ??

Lista formateada de opciones Copilot para Visual Studio 2022 Categoría: Copilot Conversations Preview Opciones de chat general
  • copilot.general.chat.enableMcpProvider = true
    Activa proveedor MCP (Model Context Protocol). Mejora integración con agentes internos.

  • copilot.general.chat.enableAgentMode = true
    Permite usar Copilot en modo agentes, delegando tareas.

  • copilot.general.chat.enableWorkspaceIndexing = true
    Permite indexar la solución completa para obtener mejor contexto.

  • copilot.general.chat.autoSelectRefinementMode = false
    Evita que Copilot elija automáticamente el tipo de refinamiento.

  • copilot.general.chat.autoAttachActiveDocument = true
    Adjunta automáticamente el archivo activo al chat.

  • copilot.general.chat.enableCustomInstructions = true
    Permite usar instrucciones personalizadas (como tu estilo o reglas).

  • copilot.general.chat.enableCustomInstructionsFiles = false
    Deshabilita cargar instrucciones desde archivos externos.

  • copilot.general.chat.enableDotNetProjectSpecificInstructions = false
    No activa instrucciones específicas para proyectos .NET.

  • copilot.general.chat.enablePlanning = false
    Desactiva el módulo de planificación automática de múltiples pasos.

  • copilot.general.chat.enableViewPlanExecution = true
    Permite ver el plan cuando Copilot ejecuta acciones.

  • copilot.general.chat.enableMicrosoftLearnFunction = false
    No consulta Microsoft Learn como fuente adicional.

  • copilot.general.chat.enablePreferenceDetection = true
    Copilot detecta patrones de tu código y adapta respuestas.

  • copilot.general.chat.defaultAgent = LastSelected
    Usa el último agente seleccionado como predeterminado.

  • copilot.general.chat.preferredModelFamily = gpt-5.3-codex
    Selecciona el modelo principal para el chat.

  • copilot.general.chat.maxFunctionCallIterations = 40
    Límite de iteraciones cuando Copilot ejecuta tareas mediante funciones.

  • copilot.general.chat.errorDiagnosticsEnabled = true
    Habilita diagnósticos cuando ocurre un error.


Opciones de completado (auto‑code, sugerencias)
  • copilot.general.completions.enableNextEditSuggestions = false
    Desactiva sugerencias sobre tu próxima edición.

  • copilot.general.completions.enableNextEditSuggestionsCollapsedMode = false
    Evita mostrar sugerencias colapsadas de próxima edición.

  • copilot.general.completions.areCopilotCompletionsEnabled = true
    Activa sugerencias de completado de Copilot.


Opciones del editor
  • copilot.general.editor.enhanceNonChat = true
    Mejora características de Copilot fuera del chat.

  • copilot.general.editor.enableRenameSuggestions = true
    Muestra sugerencias cuando renombrar elementos.

  • copilot.general.editor.enableOnTheFlyDocs = true
    Muestra documentación generada al vuelo.

  • copilot.general.editor.enableFixWithCopilot = true
    Permite aplicar fixes generados por Copilot.

  • copilot.general.editor.enableGenerateDocumentationComment = true
    Crea automáticamente comentarios de documentación.

  • copilot.general.editor.enableAdaptivePaste = false
    Deshabilita pegado inteligente (transforma contenido pegado).

  • copilot.general.editor.enableMermaidPreview = false
    No activa previsualización de diagramas Mermaid.


Control de versiones (Git)
  • copilot.general.sourceControl.enableCommitMessageSuggestions = true
    Sugerencias automáticas para mensajes de commit.

  • copilot.general.sourceControl.customizedTemplate
    (Vacío) — sin plantilla personalizada.


Depuración (Debugger)
  • copilot.general.debugger.enableDiagnosticsHubSuggestions = true
    Activa sugerencias dentro del Hub de Diagnóstico.

  • copilot.general.debugger.enableDiagnosticsHubProfilerAgent = false
    Desactiva el agente de perfilado de Copilot.

  • copilot.general.debugger.enableBreakpointSuggestions = true
    Sugiere puntos de corte relevantes.

  • copilot.general.debugger.enableDebugErrorCodeService = true
    Explica códigos de error cuando depuras.

  • copilot.general.debugger.enableParallelStacksSummarizationService = true
    Resume y explica pilas paralelas.


Opciones JavaScript
  • copilot.general.javascript.enableJavaScriptProjectSystemCopilotFileNew = true
    Mejora la creación de archivos JS con plantillas asistidas.

Herramientas
  • copilot.general.tools.toolSettings = []
    Lista vacía: sin herramientas adicionales configuradas.


Kiquenet

unread,
Mar 20, 2026, 9:03:05 AMMar 20
to AltNet-Hispano

¿Por qué NO existe settings.json en tu caso?

Porque Visual Studio 2022 no usa settings.json para Copilot, aunque algunos documentos antiguos lo mencionen.

Solo lo usa:

  • GitHub Copilot for VS Code
  • Y algunos entornos híbridos

En VS2022, Copilot guarda toda la configuración en:

  1. ApplicationPrivateSettings.xml
    C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\17.0_6a071d34\ApplicationPrivateSettings.xml

  2. CurrentSettings.vssettings
    C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\17.0_6a071d34\Settings\CurrentSettings.vssettings


Kiquenet

unread,
Mar 30, 2026, 11:49:40 AM (9 days ago) Mar 30
to AltNet-Hispano

NET Framework 4.8.1


## C# Language Version is 7.3
- This project is limited to C# 7.3 features only. Please avoid using:

### C# 8.0+ Features (NOT SUPPORTED):
  - Using declarations (`using var stream = ...`)
  - Await using statements (`await using var resource = ...`)
  - Switch expressions (`variable switch { ... }`)
  - Null-coalescing assignment (`??=`)
  - Range and index operators (`array[1..^1]`, `array[^1]`)
  - Default interface methods
  - Readonly members in structs
  - Static local functions
  - Nullable reference types (`string?`, `#nullable enable`)

### C# 9.0+ Features (NOT SUPPORTED):
  - Records (`public record Person(string Name)`)
  - Init-only properties (`{ get; init; }`)
  - Top-level programs (program without Main method)
  - Pattern matching enhancements
  - Target-typed new expressions (`List<string> list = new()`)

### C# 10+ Features (NOT SUPPORTED):
  - Global using statements
  - File-scoped namespaces
  - Record structs
  - Required members

### Use Instead (C# 7.3 Compatible):
  - Traditional using statements with braces
  - Switch statements instead of switch expressions
  - Explicit null checks instead of null-coalescing assignment
  - Array slicing with manual indexing
  - Abstract classes or interfaces instead of default interface methods
Message has been deleted

Kiquenet

unread,
Apr 7, 2026, 9:39:24 AM (17 hours ago) Apr 7
to AltNet-Hispano
diferencias entre
README
CONTRIBUTING
INSTRUCTIONS
CODE_OF_CONDUCT 
?
Message has been deleted
Message has been deleted

Kiquenet

unread,
Apr 7, 2026, 3:06:49 PM (12 hours ago) Apr 7
to AltNet-Hispano
README   .  md -> Cualquiera (qué es el proyecto y por qué existe) -> siempre
README_DEV   .  md -> Desarrolladores (cómo trabajar en el proyecto día a día) -> proyecto mediano o grande
ARCHITECTURE   .  md -> Devs senior (decisiones arquitectónicas y trade‑offs) -> cuando hay complejidad real
DECISIONS   .  md / ADR   .  md -> Técnicos (histórico de decisiones importantes) -> si quieres evitar repetir errores
CONTRIBUTING   .  md -> Contributors (reglas para colaborar sin caos) -> si aceptas PRs
CODE_OF_CONDUCT   .  md -> Comunidad / Legal (límites de comportamiento) -> repos públicos o empresa
SECURITY   .  md -> Devs / Seguridad (política y canal de reporting de seguridad) -> código en producción
INSTALL   .  md -> Usuarios / Ops (cómo instalar el proyecto) -> setup no trivial
USAGE   .  md -> Usuarios (cómo usar el producto) -> si no es autoexplicativo
TROUBLESHOOTING   .  md -> Usuarios / Soporte (problemas comunes y soluciones) -> cuando ya ocurren siempre
FAQ   .  md -> Usuarios (respuestas a preguntas repetidas) -> cuando el soporte se repite
STYLEGUIDE   .  md -> Desarrolladores (convenciones de estilo) -> si linters no cubren todo
GLOSSARY   .  md -> Nuevos miembros (definición de términos del dominio) -> dominio complejo
CHANGELOG   .  md -> Usuarios / Devs (lista de cambios por versión) -> si versionas en serio
ROADMAP   .  md -> Stakeholders (dirección futura del proyecto) -> si gestionas expectativas
INSTRUCTIONS   .  md -> Humanos internos (guías operativas varias) -> uso interno cerrado
ONBOARDING   .  md -> Nuevos devs (primeros pasos sin molestar) -> equipos en crecimiento
DEPLOYMENT   .  md -> DevOps (cómo se despliega) -> deploy no trivial
MAINTENANCE   .  md -> Equipo core (qué se puede tocar y qué no) -> proyectos longevos

Kiquenet

unread,
Apr 7, 2026, 3:09:41 PM (12 hours ago) Apr 7
to AltNet-Hispano

Lo que no debes hacer (y se hace constantemente)
  • ❌ Meter todo en README
  • ❌ Crear ficheros ambiguos (“NOTES.md”, “INFO.md”)
  • ❌ Duplicar reglas entre README, CONTRIBUTING y otros
  • ❌ Escribir docs “por si acaso” que nadie mantiene

Cada fichero debe responder una sola pregunta.
Si responde más de una → está mal diseñado.


Separación clara (esto es clave)
  • Raíz → Humanos
  • .github/copilot-instructions  . md → IA (visión global)
  • instructions/*  .  md → IA (reglas especializadas)

Si mezclas humanos e IA en los mismos .md,
estás creando documentación esquizofrénica.


Regla dura para decidir si crear un .md

Crea el fichero solo si:

  1. La pregunta aparece repetidamente
  2. La respuesta no cabe bien en otro fichero
  3. El coste de no documentarlo > coste de mantenerlo

Si no cumple las 3 → no lo crees.

Reply all
Reply to author
Forward
0 new messages