none
Doesn't Add custom item template RRS feed

  • Question

  • I create a custom item template using extensibility project and click  add item in add new item dialog box its throw the exception.

    Object reference not set to an instance of an object.

    Error Log:

    Recoverable
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.VisualStudio.TemplateWizard.Wizard.EnumContentsAddItem(ProjectItems projectItems, XmlNode contentNode, String projectName, String currentFolder, String currentTargetFolder, String rootName, String templateFolderPath, String destinationRootFolderPath, String userSpecifiedDestItemPath, String projectTypeString, List`1 wizardExtensions, String rootExtension)
       at Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(Object application, Int32 hwndOwner, Object[]& ContextParams, Object[]& CustomParams, wizardResult& retval)
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
       at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.RunWizard(SimpleHierarchyNode parentNode, String itemName, String wizardToRun, IntPtr dlgOwner)
       at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<AddItemWithSpecificAsync>d__613.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<>c__DisplayClass476_0.<<AddItem>b__0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
       at Microsoft.VisualStudio.Threading.JoinableTask`1.CompleteOnCurrentThread()
       at Microsoft.VisualStudio.ProjectSystem.ProjectMultiThreadedService.ExecuteSynchronously[T](Func`1 asyncAction)
       at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectNode.<>c__DisplayClass568_0.<HrInvoke>b__0()
       at Microsoft.VisualStudio.ProjectSystem.VS.HResult.Invoke(Func`1 action, IServiceProvider vsShellServiceProvider, IProjectFaultHandlerService projectFaultHandlerService, UnconfiguredProject project)

    Wednesday, January 30, 2019 9:00 AM