Not working with RC0 / February SSMS releases

DaveDustinDaveDustin Posts: 10 Bronze 4
edited March 22, 2016 6:29AM in SQL Prompt
Hi All,

Just installed SQL2016 RC0 and the February 2016 SSMS SSMS to my laptop.
Unfortunalely SQLPrompt (7.1.0.314) doens't work any more.

Error being logged:
08 Mar 2016 03:52:52,810 [1] WARN  RedGate.SQLPrompt.CommonVS.Editor.TextLinesMonitor - Couldn't retrive the language service
System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at ..(Object , ResolveEventArgs )
   at System.AppDomain.OnResourceResolveEvent(RuntimeAssembly assembly, String resourceName)
   at System.Reflection.RuntimeAssembly.GetResource(RuntimeAssembly assembly, String resourceName, UInt64& length, StackCrawlMarkHandle stackMark, Boolean skipSecurityCheck)
   at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name, StackCrawlMark& stackMark, Boolean skipSecurityCheck)
   at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name)
   at RedGate.SqlPrompt.Parser.Lexer.SqlTokens.(IEnumerable`1 , ISet`1 , Int32 )
   at RedGate.SqlPrompt.Parser.Lexer.SqlTokens..ctor(IEnumerable`1 keywordFiles, String[] keywordsToIgnore, IEnumerable`1 semikeywordFiles)
   at RedGate.SqlPrompt.Parser.Lexer.Sql2016Tokens..ctor()
   at RedGate.SqlPrompt.Parser.Lexer.Sql2016Tokens.get_Instance()
   at RedGate.SqlPrompt.Parser.Lexer.SqlTokens.GetTokens(ServerVersion serverVersion)
   at RedGate.SqlPrompt.Parser.Lexer.Scanner..ctor(ServerVersion serverVersion)
   at RedGate.SqlPrompt.Parser.Lexer.SqlLexer..ctor(ServerVersion serverVersion)
   at RedGate.SqlPrompt.Engine.SqlPromptEngine.ResetLexerCache()
   at RedGate.SqlPrompt.Engine.SqlPromptEngine..ctor(IEngineOptions options, ILayoutOptions layoutOptions, IScriptProvider scriptProvider)
   at RedGate.SQLPrompt.CommonUI.Editor.EditorWindowBase.Setup(ISynchronizeInvoke uiInvoker, IScriptProvider scriptProvider, IMarkerContainer markerContainer, IEnumerable`1 surroundWithCandidateSources)
   at RedGate.SQLPrompt.CommonVS.Editor.VSEditorWindowBase..ctor(AddinServices services, IVsTextView textView, ISynchronizeInvoke uiThreadInvoker, FontManager fontManager, ISqlPromptOptions options, IMainWindow mainWindow, IVSCommandSource commandSource, IToastStackController toastStackController)
   at DynamicInjectored0b660a52d44020a03a917ca9a0ccf2(Object[] )
   at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
   at Ninject.Activation.Context.Resolve()
   at Ninject.KernelBase.<>c__DisplayClasse.<Resolve>b__a(IBinding binding)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__94`1.MoveNext()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at RedGate.SQLPrompt.CommonVS.Editor.EditorModule.CreateVSEditorWindow(IVsTextView view)
   at RedGate.SQLPrompt.CommonVS.Managers.EditorManager.OnNewLanguageService(TextLinesMonitor monitor, Guid languageGuid, Boolean isReadonly)
   at RedGate.SQLPrompt.CommonVS.Editor.TextLinesMonitor.OnNewLanguageService(Guid& sidLangServiceID)
   at RedGate.SQLPrompt.CommonVS.Editor.TextLinesMonitor.DetectLanguageService()
Dave Dustin
Data Platform MVP

Comments

  • mmcnamarammcnamara Posts: 3 Bronze 1
    I'm hitting the exact same issue after installing the RC0 / February SSMS release this evening.

    - Michael
  • Aaron LAaron L Posts: 596 New member
    Hi Dave,

    Thanks for letting us know! We're looking into this now and will hopefully have a new build with a fix out later today. I'll let you know when it's ready to download.

    Thanks,
    Aaron.
  • Aaron LAaron L Posts: 596 New member
    Hi Dave,

    We've just released a new version of SQL Prompt (7.1.0.315) which supports the latest SSMS preview. You can download the new build directly from here.

    Please let me know if you have any issues with this new build.

    Thanks,
    Aaron.
  • mmcnamarammcnamara Posts: 3 Bronze 1
    Thanks for the quick turnaround! So far, so good...

    - Michael
  • DaveDustinDaveDustin Posts: 10 Bronze 4
    Aaron Law wrote:
    We've just released a new version of SQL Prompt (7.1.0.315) which supports the latest SSMS preview. You can download the new build directly from here.
    Excellent work, thanks for the fast turnaround.
    Dave Dustin
    Data Platform MVP
  • I too just installed RC0 and had the same issue as others. I installed the latest release of SQL Prompt (7.1.0.315), but it is still not working. I am still seeing this error in the log...
    09 Mar 2016 17:24:20,271 [1] WARN RedGate.SQLPrompt.CommonVS.Editor.TextLinesMonitor - Couldn't retrive the language service
    System.NullReferenceException: Object reference not set to an instance of an object.
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
  • Aaron LAaron L Posts: 596 New member
    Hi borchamc,

    Could you enable verbose logging (under SQL Prompt->Help->Enable Verbose Logging) then restart SSMS and open a new query, then email me (aaron.law@red-gate.com) your SQL Prompt log file?

    We've also let Microsoft know about the NullReferenceException as it's originating in one of the internal SSMS classes so hopefully they'll be able to make a fix from their side. Our fix was more of a workaround (the exception is thrown by a class handling assembly resolving so Prompt wasn't getting a chance to resolve the assembly load. Our workaround was to try to make sure we handle the event first)

    Thanks,
    Aaron.
  • Aaron LAaron L Posts: 596 New member
    We've been able to track down borchamc's issue and it looks like it was caused by having SQL Dependency Tracker and/or SQL Test installed. Depending on the load order of these addins, the SQL Prompt fix might not work.

    If anyone is having trouble getting SQL Prompt to work in the latest SSMS preview after installing 7.1.0.315, uninstalling SQL Dependency Tracker and SQL Test might help.

    We're looking into a fix now.

    Thanks,
    Aaron.
  • Aaron LAaron L Posts: 596 New member
    Hi all,

    Just a quick update on this, we've heard back from Microsoft and they've been able to fix the null reference causing this issue. It should be resolved in the next SSMS release.

    There should also be workarounds in the next releases of SQL Test and SQL Dependency Tracker which are due out soon.

    Thanks,
    Aaron.
Sign In or Register to comment.