Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PowerShell EPS Templates for C# and XAMLNew to Visual Studio Code? Get it now.
PowerShell EPS Templates for C# and XAML

PowerShell EPS Templates for C# and XAML

J. Heilingbrunner

|
2 installs
| (0) | Free
Syntax highlighting for EPS (Embedded PowerShell) templates generating C# and XAML: *.cs.eps, *.xaml.eps, *.xaml.cs.eps
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PowerShell EPS Templates for C# and XAML

Syntax highlighting for EPS (Embedded PowerShell) templates that generate C# or XAML files.

File extension Language Base grammar
*.cs.eps C# EPS source.cs
*.xaml.cs.eps C# EPS source.cs
*.xaml.eps XAML EPS text.xml

Features

  • Full C# or XML highlighting outside tags (using built-in VS Code grammars).
  • EPS tags with PowerShell highlighting: <% %>, <%= %>, <%# %> (comment), <%% / %%> (escape), and the trim variants <%- / -%>.
  • Tags work everywhere, including inside C# strings, C# comments, XML attribute values, and as element or attribute names (via L: injection).
  • Unbalanced braces such as <% foreach ($x in $y) { -%> are no problem: { and } are treated as simple tokens, and the end of the tag is always recognized.
  • Toggle comment (Ctrl+/) uses # inside a tag and // or <!-- --> outside it.

Limitations

  • Only grammar-based highlighting is provided; there is no IntelliSense. C# Dev Kit, XAML language servers, and the PowerShell extension do not work with these files because they are not valid C#, XAML, or PowerShell.
  • A subset of the PowerShell grammar is used inside tags (variables, strings, operators, keywords, cmdlets, and types). Script blocks and hashtables are not recognized as nested regions.
  • Block comments <# #> inside tags are not highlighted.

Conflicts with Other Extensions

If another extension (e.g. for XAML or PostScript .eps) claims the files, enforce the association in your settings:

"files.associations": {
  "*.cs.eps": "cs-eps",
  "*.xaml.eps": "xaml-eps"
}

Development

  • Press F5 in VS Code to start an Extension Development Host with the samples/ folder.
  • Inspect tokens with Developer: Inspect Editor Tokens and Scopes.
  • Package the extension (requires Node.js): npx @vscode/vsce package
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft