I am using string interpolation for a method attribute like -
const string User = \"SomeUser\"; const string Admin = \"Admin\"; . . . [Authorize(Roles = $\"{User
string interpolation is converted to string.Format which isn't a compile time constant as it requires kindly review this question for more information
string.Format