Skip to content

System.NullReferenceException on using uQuery.GetNodesByXPath() and uQuery.GetNodesByType() #5

@gcapnias

Description

@gcapnias

Whenever I try to use uQuery.GetNodesByXPath() and uQuery.GetNodesByType(), I get an System.NullReferenceException:

Object reference not set to an instance of an object.
   at umbraco.uQuery.GetNodesByXPath(String xpath)
   at Umbraco.Console.Program.Main(String[] args) in c:\Projects\dotSee\Moca\Umbraco-v.6.0.1\Umbraco.Console\Program.cs:line 49
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Although, when I use uQuery.GetNode() it works without any problem.

Any ideas why? Can uQuery be used in console?

Thanks in advance,
George J.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions