Does not contain a definition for and no accessible extension method

I have the following code in the Footer.cshtml of my site:

<li><span class="fa-solid fa-phone"></span><a href="tel:@primaryFooter.Phone">@primaryFooter.Phone</a></li>
<li><span class="fa-solid fa-house"></span>@primaryFooter.Address</li>

These two lines work perfectly. I was even able to track down the properties in the Primary Footer object, as seen here:

So I tried to add an additional property called “Fax” to the Primary Footer, like so:

I then tried to access this property in Footer.cshtml, but I am getting this error:

‘PrimaryFooter’ does not contain a definition for ‘Fax’ and no
accessible extension method ‘Fax’ accepting a first argument of type
‘PrimaryFooter’ could be found (are you missing a using directive or
an assembly reference?)

Here is the code as it is now:

<li><span class="fa-solid fa-phone"></span><a href="tel:@primaryFooter.Phone">@primaryFooter.Phone</a></li>
<li><span class="fa-solid fa-fax"></span>@primaryFooter.Fax</li>
<li><span class="fa-solid fa-house"></span>@primaryFooter.Address</li>

Why do “Address” and “Phone” work and my newly added “Fax” property doesn’t? I really don’t see how I could be missing a “using” or “include”, since the “Address” and “Phone” properties are also part of the Primary Footer. What am I missing here?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/115250-does-not-contain-a-definition-for-and-no-accessible-extension-method