ampscript-core
ampscript-core copied to clipboard
If another AMPScript extension is installed, an error is received on run and debug.
:red_circle:When running in Visual Studio Code, extensions causing this error may include but are not limited to:
- MCFS [AMPScript] by Agadzhanov Sergey
:green_circle:The error did not appear when using:
- AMPscript code snippet by MarketingThibs
- ampscript-language by xnerd
- AMPscript Beautifier by FiB
:information_source:Current workaround is to disable the extension, which is causing the issue.
Hello,
I installed and ran the debug process, I got this instead of a website:
NullReferenceException: Object reference not set to an instance of an object. Sage.Engine.Runtime.RuntimeContext..ctor(IServiceProvider provider, CompilationOptions rootCompileOptions, SubscriberContext subscriberContext) in d:\dev\code\ampscript-core\src\Sage.Engine\Runtime\RuntimeContext.cs Sage.Engine.Renderer.Render(CompilationOptions compOptions, SubscriberContext context) in d:\dev\code\ampscript-core\src\Sage.Engine\Renderer.cs Sage.Engine.WebRequestRenderer.RenderContent(CompilationOptions inputOption) in d:\dev\code\ampscript-core\src\Sage.Webhost\WebRequestRenderer.cs Program+<>c__DisplayClass0_0.<<Main>$>b__0() in d:\dev\code\ampscript-core\src\Sage.Webhost\Program.cs lambda_method1(Closure , object , HttpContext ) Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Show raw exception details System.NullReferenceException: Object reference not set to an instance of an object. at Sage.Engine.Runtime.RuntimeContext..ctor(IServiceProvider provider, CompilationOptions rootCompileOptions, SubscriberContext subscriberContext) in d:\dev\code\ampscript-core\src\Sage.Engine\Runtime\RuntimeContext.cs:line 53 at Sage.Engine.Renderer.Render(CompilationOptions compOptions, SubscriberContext context) in d:\dev\code\ampscript-core\src\Sage.Engine\Renderer.cs:line 28 at Sage.Engine.WebRequestRenderer.RenderContent(CompilationOptions inputOption) in d:\dev\code\ampscript-core\src\Sage.Webhost\WebRequestRenderer.cs:line 36 at Program.<>c__DisplayClass0_0.<<Main>$>b__0() in d:\dev\code\ampscript-core\src\Sage.Webhost\Program.cs:line 32 at lambda_method1(Closure, Object, HttpContext) at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
What are my next steps?
Cheers,