Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Unanswered

BC 14 On Prem Issue. VS code not showing error.

Posted on by 9
Hi,
I am publishing an extenion on BC14 On Prem, that has been previoulsy built on Cloud, I have resolved all the erros but while publishing, it is giving the following error, it is not showing any line number as well,

The request for path /BC140/dev/apps?SchemaUpdateMode=forcesync&DependencyPublishingOption=default failed with code UnprocessableEntity. Reason: Object reference not set to an instance of an object.

How can I know the line where is coming from? I have checked the Event viewer as well but there was nothing useful as well.
On VS code AL Extension latest version (13.1) the package is getting created but on VS code AL extension 3.0 the package is not getting created with following error:

Can anyone help ?
 
Details:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.CodeGenerator.IsExpressionNestedAndAccessingParent(BoundExpression node) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\CodeGenerator_Expressions.cs:line 497
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.EmitGlobalScopeAccess(BoundExpression node) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator.cs:line 748
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.CodeGenerator.EmitBuiltInMemberAccessExpression(BoundCall call, BuiltInMethodTypeSymbol builtinMethod) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\CodeGenerator_Expressions.cs:line 346
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.CodeGenerator.EmitBuiltInMethodOrPropertyCall(BoundCall call) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\CodeGenerator_Expressions.cs:line 280
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.CodeGenerator.EmitExpression(BoundExpression expr, Boolean suppressTarget, Boolean isStatement) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\CodeGenerator_Expressions.cs:line 46
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.EmitExpressionStatement(BoundExpressionStatement stmt) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator_Statements.cs:line 23
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.EmitSingleStatement(ArrayBuilder`1 statementList, BoundStatement stmt) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator_Statements.cs:line 224
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.EmitBlock(BoundBlock block) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator_Statements.cs:line 125
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.EmitScopeRunMethod() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator.cs:line 693
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.EmitScopeClass() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator.cs:line 297
   at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.MethodCodeGenerator.Generate() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\CodeGen\MethodCodeGenerator.cs:line 124
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMethod(MethodSymbol methodSymbol) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 428
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMembers(ContainerSymbol containingType) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 302
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMembers(ContainerSymbol containingType) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 328
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMembers(ContainerSymbol containingType) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 328
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMembers(ContainerSymbol containingType) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 328
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMembers(ContainerSymbol containingType) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 349
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileObject(ObjectTypeSymbol containingType) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 191
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.<>c__DisplayClass15_0.<CompileObjectAsTask>b__0() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 175
   at Microsoft.Dynamics.Nav.CodeAnalysis.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Utilities\UICultureUtilities.cs:line 149
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.WaitForWorkers() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 136
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMethodBodies(Compilation compilation, ModuleBuilder moduleBeingBuiltOpt, Boolean hasDeclarationErrors, DiagnosticBag diagnostics, Predicate`1 filterOpt, Predicate`1 radCompilationFilter, CancellationToken cancellationToken) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 125
   at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.CompileImpl(ModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate`1 filterOpt, Predicate`1 radCompilationFilter, CancellationToken cancellationToken) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 827
   at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.Compile(ModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate`1 filterOpt, Predicate`1 radCompilationFilter, CancellationToken cancellationToken) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 802
   at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.PackageTheModule(Compilation compilation, Compilation analyzerCompilation, CompilerTextWriter consoleOutput, CancellationToken cancellationToken, ErrorLogger errorLogger, AnalyzerDriver analyzerDriver, Predicate`1 filterOpt, Predicate`1 radCompilationFilter) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 636
   at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.RunCoreImpl(CompilerTextWriter consoleOutput, ErrorLogger errorLogger, Compilation compilation, Compilation analyzerCompilation, AnalyzerDriver analyzerDriver, IEnumerable`1 analyzerExceptionDiagnostics, IEnumerable`1 additionalTextFiles, CancellationToken cancellationToken) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 477
   at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.RunCore(CompilerTextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 429
   at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.Run(CompilerTextWriter consoleOutput, CancellationToken cancellationToken) in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 330
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.CreatePackageRequestHandler.<HandleAsync>d__3.MoveNext() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\CreatePackageRequestHandler.cs:line 57
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.MessageProtocol.RequestHandlerBase`1.<HandleAsync>d__9.MoveNext() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\MessageProtocol\RequestHandlerBase.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.<Process>d__6.MoveNext() in F:\a\185\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 64
 
Categories:
  • Suggested answer
    KB-05071137-0 Profile Picture
    KB-05071137-0 4 on at
    BC 14 On Prem Issue. VS code not showing error.
    Hi,
     
    You're trying to install an extension on BC On-prem which is previously compiled on Cloud.
     
    By looking at the error message, it could be possible that the code is not able to find or missing some reference in the local DLLs (which comes with On-prem installation), which might have been present in the Cloud libraries.
     
    You can look out for some code which redirects on .net code of local libraries.
     
    Not sure, but it might help.
     
    Best Regards!
  • CU25061418-0 Profile Picture
    CU25061418-0 9 on at
    BC 14 On Prem Issue. VS code not showing error.
    Hi YUN ZHU, Yes it is not compiling with BC14 on runtime 3.0, but package does get created with latest VS code AL extension,
    Strange thing is the error is not visible...

    Will docker installation of BC14 will have a impact ? Can I know the error with docker based installion ?
    thanks 
  • YUN ZHU Profile Picture
    YUN ZHU 63,522 Super User on at
    BC 14 On Prem Issue. VS code not showing error.
    I'm not sure, but your extension doesn't seem to be compiled under BC14. Please connect to the BC14 environment in VS Code, re-download the Symbol file, package it into an app and try publishing it again.
     
     
    Hope this helps.
    Thanks.
    ZHU

Helpful resources

Quick Links

First Dynamics 365 Community Call (CRM Edition)

Don't miss the first D365 Community Call on 7/10!

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 285,642 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,485 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans