The following line does not compile when I put in a Razor View.
var extPropLookupNameCompania = $\"extension_{SettingsHelper.ClientId.Replace(\"-\", \"\")}_{
You have to encapsulate it with braces like this:
EDIT: I updated because there was a missing curly.
var extPropLookupNameCompania = $("{extension_{SettingsHelper.ClientId.Replace("-", "")}_{"Compania"}");
I tried the following successfully:
@($"It is {DateTime.Now}")