Labs > Visual Studio Extension: Hide “No Source Available” tab

This small extension will prevent the tool window with title “No Source Available” from appearing in Visual Studio, and preserve the focus on the currently active tab.

Alas, along with brilliant features such as IntelliTrace, Visual Studio otherwise displays a tab stating that it cannot find source code where to step into. This is obvious when simply pausing an idle application, therefore it forces the developer to close this window before getting back to the code he wants to modify, which may be a productivity killer.

Finding absolutely no solution/workaround despite an exhaustive digging created an immense frustration and at the same time a good reason to play with the Visual Studio Extensibility framework and accomplish the job myself :). The result is much fitter than what I could have done with AutoIT (probably an always running background loop checking for specific IDE windows through graphical pattern matching).

Let’s hope this extension will be short-term lived as the Visual Studio development team adds an option to better control this behavior!

This extension should work with all locales of Visual Studio.

Feature requests are welcome here. Official GitHub repository here. Contributions are welcome.

You can install the extension from within Visual Studio directly or download the VSIX installable package from the Visual Studio Marketplace.

18 comments for post “Visual Studio Extension: Hide “No Source Available” tab”

  1. Saurus
    25 November 2010 | 11:13 PM

    This is excellent, that annoying “No Source Available” screen was killing me.

    Maybe I am just not VS2010 in the right way that Microsoft were expecting but this popup is very annoying.

  2. johann
    10 December 2010 | 09:33 PM

    i guess this is only working on english Versions. Tried it with German Language Visual Studio 2010 but doesn’t work.

    Will check back once in a while hpoing for a int fix.

    thx in advance

  3. 11 December 2010 | 12:40 AM

    German support was added. Thanks for your feedback.

  4. Jafin
    15 December 2010 | 06:46 AM

    Oh how I wish there wasn’t a need for this addon. But THANK YOU for writing it. Lets hope one day MS acquire your app for $1,000,000 and intergrate it into VS2010 SP1

  5. Bob
    31 May 2011 | 10:40 AM

    Plz add support to spanish languege.

    Thx so much!

  6. Henri Demers
    16 January 2012 | 08:22 PM

    I got another solution for you all. It is a hack but its working well. I love ILSpy and reflector.

    The idea is to change some values in a visual studio package. In this case, i removed a specific delegate the SolutionOpened invocation list of the package. This is preventing initialisation of the NoSourceToolWindow. If it does not listen to the debugger engine, it does not show.

    Hope its helps.

    private void OnBeforeLoadSolution()
    {
    RemoveNoSourceToolWindow();
    }

    private void RemoveNoSourceToolWindow()
    {
    var guid = new Guid(“BEB01DDF-9D2B-435B-A9E7-76557E2B6B52”);
    try
    {
    // Remove the no soure tool window
    // Get the Razor package
    IVsPackage package = null;
    var shell = ServiceProvider.GetService(typeof(IVsShell)) as IVsShell;
    if (shell != null)
    {
    shell.IsPackageLoaded(ref guid, out package);
    }
    if (package == null)
    {
    shell.LoadPackage(ref guid, out package);
    }

    if (package != null)
    {
    // Get the solution opened event handler and remove the NoSourceToolWindowAdapter delegate from it.
    var packageType = package.GetType();
    var eventInfo = packageType.GetEvent(“SolutionOpened”);
    var fieldInfo = packageType.GetField(eventInfo.Name, AllBindings);
    if (fieldInfo != null)
    {
    var eventValue = fieldInfo.GetValue(package) as Delegate;
    if (eventValue != null)
    {
    var list = eventValue.GetInvocationList();
    foreach (var eventDelegate in list)
    {
    if (eventDelegate.Target == null)
    continue;
    var targetType = eventDelegate.Target.GetType();
    if (targetType.Name == “NoSourceToolWindowAdapter”)
    {
    eventInfo.RemoveEventHandler(package, eventDelegate);
    }
    }
    }
    }
    }

    }
    catch (Exception e)
    {
    throw e;
    }
    }

  7. 17 February 2012 | 08:14 AM

    Thank you very much Henri for you contribution; I have rewritten the code of the extension using your idea and it is now much more robust and universal.

    I have published the source code on Codeplex at the same time (see URL in my article).

  8. Yeprem
    30 August 2012 | 06:32 PM

    Any chance you could republish this for VS 2012? I absolutely hate having to see this tab open.

  9. 31 August 2012 | 04:59 AM

    Hi Yeprem, I have planned to work on this by next month (I am not using VS 2012 yet), but you can already play with the code on Codeplex and submit a patch if you would like. Someone on Visual Studio Gallery suggested only something minor is missing to make it work with VS 2012.

  10. 14 September 2012 | 07:04 PM

    Hi Yeprem, I added support for Visual Studio 2012 a few days ago. Enjoy!

  11. Yeprem
    14 September 2012 | 07:27 PM

    That is awesome. I was not even able to get time to look at the source let alone update it. Thank you for taking the time because I really miss not having to see that tab open up. By the way, I love your email notification system on this site.

  12. musa
    13 October 2012 | 08:24 AM

    After installing your fix, but now when I single step with F10 or F11 in the debugger, I do not see the source code file with the yellow-arrow marker which usually tells what source line will be executed next. Any suggestion. Thanks

  13. 13 October 2012 | 09:48 AM

    Hi Musa, I have never encountered the behavior you describe. I would need more information to help you.

  14. musa
    14 October 2012 | 04:34 PM

    How may I & post to your site where it shows the vs2010 source code without pointing arrow in the gutter of source code. Can you enable the site so I may post this image of my screen, it may help, or pls advise. Or it this a issue an msdn issue, as i have not gotten feedback from msdn in 2 days? Thanks much.

  15. CK
    17 December 2012 | 06:55 AM

    WAW amazing it is!!

    Thanks. Keep up the good work. 😉

    Thanks.

  16. Mark
    7 November 2013 | 07:55 PM

    Friggin awesome. worked!

  17. ryan
    24 November 2014 | 09:59 PM

    Thanks, this is fantastic

  18. Dan
    26 July 2023 | 02:39 PM

    Wow!! I have FINALLY found a way to get rid of that lame tab when I manually break!

    And, LOL…yes, still using VS2010…still works for me.

Leave a comment