PublishedContentBase does not contain a definition for 'GetPropertyValue'

Hi,

I’ve created a multinode tree picker datatype and trying to list the the thumbnail of a vehicle as part of the foreach loop, however i keep getting the error message;

'Umbraco.Web.Models.PublishedContentBase' does not contain a definition for 'GetPropertyValue'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Umbraco.Web.Models.PublishedContentBase' does not contain a definition for 'GetPropertyValue'

Source Error: 


Line 23:                 @if (content.HasValue("vehicleThumbnail"))
Line 24:                 {
Line 25:                     var mediaItem = Umbraco.TypedMedia(content.GetPropertyValue("vehicleThumbnail")); 
Line 26:                     <img class="featuredVehicleImg img-responsive" src="@mediaItem.GetPropertyValue("umbracoFile")" alt="@content.Name"/>    
Line 27:                 }

Below is the razor code;

@inherits Umbraco.Web.Macros.PartialViewMacroPage

@*
	Macro to list nodes from a Multinode tree picker, using the pickers default settings.
	Content Values stored as xml.

	To get it working with any site's data structure, simply set the selection equal to the property which has the 
	multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property).
*@

@* Lists each selected value from the picker as a link *@

<div class="featuredVehicles">
    @foreach (var id in CurrentPage.featuredVehicles.Split(','))
    {    
        
	@*For each link, get the node, and display its name and url*@
        var content = Umbraco.Content(id);

        <div class="col-xs-6 col-md-4 col-xs-height">
            <a href="@content.Url">

                @if (content.HasValue("vehicleThumbnail"))
                {
                    var mediaItem = Umbraco.TypedMedia(content.GetPropertyValue("vehicleThumbnail")); 
                    <img class="featuredVehicleImg img-responsive" src="@mediaItem.GetPropertyValue("umbracoFile")" alt="@content.Name"/>    
                }

                <strong>
                    <span class="name">@content.Name</span>
                </strong>

                <span class="desc">@content.shortContent</span>

                <span class="prx"><strong>@content.vehiclePrice</strong>from, per day</span>

                <span class="label label-primary moreinfo">More Info</span>

            </a>
        </div>
    }
</div>

Tried .umbracoFile and .Url but neither seems to work.


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/63239-publishedcontentbase-does-not-contain-a-definition-for-getpropertyvalue