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: