Skip to content

Configuration

If you’re using CommunityToolkit.Mvvm with source-generated [ObservableProperty] partial properties, Reflector works alongside it:

  1. Set the language version to preview in your project file:

    <PropertyGroup>
    <LangVersion>preview</LangVersion>
    </PropertyGroup>
  2. Apply both attributes to your ViewModel:

    [Reflector]
    public partial class MyViewModel : ObservableObject
    {
    [ObservableProperty]
    public partial string MyProperty { get; set; }
    }
PropertyDefaultDescription
ShinyReflectorUseInternalAccessorsfalseGenerate internal accessors instead of public
ShinyReflectorGenerateAssemblyInfotrueEnable or disable AssemblyInfo class generation
ShinyReflectorAssemblyInfoClassNameAssemblyInfoClass name for the generated constants
ShinyReflectorAssemblyInfoNamespaceRoot namespaceNamespace for the generated AssemblyInfo class
<PropertyGroup>
<ShinyReflectorUseInternalAccessors>true</ShinyReflectorUseInternalAccessors>
<ShinyReflectorGenerateAssemblyInfo>true</ShinyReflectorGenerateAssemblyInfo>
<ShinyReflectorAssemblyInfoClassName>MyAssemblyInfo</ShinyReflectorAssemblyInfoClassName>
<ShinyReflectorAssemblyInfoNamespace>My.Namespace</ShinyReflectorAssemblyInfoNamespace>
</PropertyGroup>

An AI skill is available for Shiny Reflector to help generate reflector attributes, assembly info, and follow best practices directly in your IDE.

Claude Code

Terminal window
claude plugin add github:shinyorg/skills

GitHub Copilot — Copy the shiny-reflector skill file into your repository’s custom instructions.