Logo
BUG: NullReferenceException showing properties of executable project if inside solution project

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio 2010
Date: January 2014   Microsoft Visual Studio 2012
      Microsoft Visual Studio 2013
Introduction

Sometimes you may want to use the Add > Existing Project context menu of the Solution Explorer to add an executable as a project to the solution. For example, to debug the add-in with several Visual Studio versions (devenv.exe executable) or to force the debugger version (2.0, 4.0, etc.) for an add-in of such executable as decribed in Procedure #3 at HOWTO: Debug an add-in for the VBA editor (32-bit or 64-bit) of Office with Visual Studio .NET.

It happens that if you add the executable inside a solution folder, you can't show its properties page. If you add it inside the solution node you can.

More Information

Steps to reproduce the problem:

  • Create a blank solution.
  • In the solution node, right-click it and select the "Add" > "Existing Project..." menu entry. Select "C:\Program Files\Microsoft Office\Office14\Excel.exe", for example.
  • Click F4 to show its Properties window.
  • In the Properties window toolbar, click the Properties Page button. The Properties page appears and you can set several properties.
  • Create a solution folder.
  • In the solution folder node, right-click it and select the "Add" > "Existing Project..." menu entry. Select "C:\Program Files\Microsoft Office\Office14\MSAccess.exe", for example.
  • Click F4 to show its Properties window.
  • In the Properties window toolbar, click the Properties Page button. You get "Object reference not set to an instance of an object".

This worked in Visual Studio 2008 and got broken in Visual Studio 2010.



Go to the 'Visual Studio Extensibility (VSX)' web site for more articles like this (Articles section)


Top