Server Error in '/' Application.

The call is ambiguous between the following methods or properties: 'umbraco.MacroEngines.DynamicMedia.DynamicMedia(int)' and 'umbraco.MacroEngines.DynamicMedia.DynamicMedia(string)'

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: The call is ambiguous between the following methods or properties: 'umbraco.MacroEngines.DynamicMedia.DynamicMedia(int)' and 'umbraco.MacroEngines.DynamicMedia.DynamicMedia(string)'

Source Error:


Line 14:         <div style="width: 40%; float: right; margin:0 0 10px 10px;">
Line 15:             @{ 
Line 16:                 dynamic img = new umbraco.MacroEngines.DynamicMedia(CurrentPage.picture);
Line 17:                 <img class="recipe-img" src="@img.umbracoFile" alt="@CurrentPage.Name" style="width: 100%; box-shadow: 0 0 1px 0 #000;" /> 
Line 18:             }

Source File: c:\inetpub\Vhost\MyFridgeFood\Views\TipPage.cshtml    Line: 16

Stack Trace:


[RuntimeBinderException: The call is ambiguous between the following methods or properties: 'umbraco.MacroEngines.DynamicMedia.DynamicMedia(int)' and 'umbraco.MacroEngines.DynamicMedia.DynamicMedia(string)']
   CallSite.Target(Closure , CallSite , Type , Object ) +252
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +631
   ASP._Page_Views_TipPage_cshtml.Execute() in c:\inetpub\Vhost\MyFridgeFood\Views\TipPage.cshtml:16
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +194
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +436
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +39
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +59
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +41
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0