Comments (15)

  1. Martin Filteau says:

    After creating an isolated-shell application, when I try to debug/run the app, I get a message box saying "Object reference not set to an instance of an object." just over the splash screen and then, the app. closes.

    Any idea?

  2. aaronmar says:

    Peter, do you have the 2008 SDK installed by any chance? We think this may be a SxS issue with the SDK’s.

    Also, I’ve posted a workaround on the Connect page.

  3. aaronmar says:

    Martin, can you try running "VSShellStub.exe /log" and see if you find anything interesting? The log file should be in %APPDATA%AppEnv…ActivityLog.xml. Please feel free to contact me via the form if you’d like to debug more offline.

  4. The workaround did the job. Thanks. Updated the connect issue with theme and sdk details

  5. tobias says:

    When I select "VS Shell Isolated" in New Project and try to build it, I get 2 Errors:

    error C1083: Cannot open include file: ‘excpt.h’: No such file or directory (in file windows.h and in project VSShellStub1)

    error RC1015: cannot open include file ‘afxres.h’ (in file VSShellStub1UI.rc and in project VSShellStub1UI)

    I tried to deinstall and reinstall the SDK, but the same error occurs. Any suggestions? I am on Vista and never had previous versions of VS or the SDK installed. Thanks.

  6. Aaron Marten says:

    Hi "Tobias",

    Did you install C++ (i.e. "Native Development") when you installed Visual Studio? This is required for building VSPackages and VS Isolated Shell projects.

    Thanks,

    Aaron

  7. Tobias says:

    Thanks Aaron, you were right. That did the job.

    Also, after successful compilation I get the same error as Martin above: After F5 the splash screen shows up and then I get the message box: Object reference not set to an instance of an object. I followed your advice and created a logfile, but I can’t see anything there. Here it is:

    <?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>

    <activity>

     <entry>

       <record>1</record>

       <time>2009/05/28 08:25:51.457</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Visual Studio Version: 0.0.0.0</description>

     </entry>

     <entry>

       <record>2</record>

       <time>2009/05/28 08:25:51.459</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Running in User Groups: Administrators Users</description>

     </entry>

     <entry>

       <record>3</record>

       <time>2009/05/28 08:25:51.463</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Available Drive Space: C: drive has 12160204800 bytes</description>

     </entry>

     <entry>

       <record>4</record>

       <time>2009/05/28 08:25:51.487</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Internet Explorer Version: 7.0.6001.18183</description>

     </entry>

     <entry>

       <record>5</record>

       <time>2009/05/28 08:25:51.489</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>.NET Framework Version: 4.0.20428.1</description>

     </entry>

     <entry>

       <record>6</record>

       <time>2009/05/28 08:25:51.490</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>MSXML Version: 6.20.1099.0</description>

     </entry>

     <entry>

       <record>7</record>

       <time>2009/05/28 08:25:51.494</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Looking for master PkgDef file</description>

       <path>C:UserstestDocumentsVisual Studio 10ProjectsVSShellStub2DebugVSShellStub2.PkgDef</path>

     </entry>

     <entry>

       <record>8</record>

       <time>2009/05/28 08:25:51.499</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Creating PkgDefCacheBoutique</description>

     </entry>

     <entry>

       <record>9</record>

       <time>2009/05/28 08:25:51.500</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Double-checking master pkgdef file</description>

     </entry>

     <entry>

       <record>10</record>

       <time>2009/05/28 08:25:51.505</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>PkgDefManagement initialized</description>

     </entry>

     <entry>

       <record>11</record>

       <time>2009/05/28 08:25:51.507</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>RootFolder</description>

       <path>C:UserstestDocumentsVisual Studio 10ProjectsVSShellStub2Debug</path>

     </entry>

     <entry>

       <record>12</record>

       <time>2009/05/28 08:25:51.508</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>ShellFolder</description>

       <path>C:Program FilesMicrosoft Visual Studio 10.0</path>

     </entry>

     <entry>

       <record>13</record>

       <time>2009/05/28 08:25:51.510</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>PkgDefSearchPath</description>

       <path>C:Program FilesMicrosoft Visual Studio 10.0\Common7IDEShellExtensions;C:Program FilesMicrosoft Visual Studio 10.0\Common7IDECommonExtensions;C:UserstestDocumentsVisual Studio 10ProjectsVSShellStub2DebugExtensions</path>

     </entry>

     <entry>

       <record>14</record>

       <time>2009/05/28 08:25:51.511</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>"ZeroImpact" = dword:0, "MergeRegistry" = dword:0</description>

     </entry>

     <entry>

       <record>15</record>

       <time>2009/05/28 08:25:51.513</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Searching for PkgDefs from search path</description>

       <path>C:Program FilesMicrosoft Visual Studio 10.0\Common7IDEShellExtensions;C:Program FilesMicrosoft Visual Studio 10.0\Common7IDECommonExtensions;C:UserstestDocumentsVisual Studio 10ProjectsVSShellStub2DebugExtensions</path>

     </entry>

     <entry>

       <record>16</record>

       <time>2009/05/28 08:25:51.515</time>

       <type>Warning</type>

       <source>VisualStudio</source>

       <description>Extension Manager settings not available, no user extensions will be loaded</description>

     </entry>

     <entry>

       <record>17</record>

       <time>2009/05/28 08:25:51.521</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Discovered 7 PkgDef files</description>

     </entry>

     <entry>

       <record>18</record>

       <time>2009/05/28 08:25:51.524</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Found PkgUnDef file, adding to configuration set</description>

     </entry>

     <entry>

       <record>19</record>

       <time>2009/05/28 08:25:51.548</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Newest node in pkgdef cache</description>

       <path>Software\VSShellStub21.0_Config</path>

     </entry>

     <entry>

       <record>20</record>

       <time>2009/05/28 08:25:51.551</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Current pkgdef cache timestamp is valid</description>

     </entry>

     <entry>

       <record>21</record>

       <time>2009/05/28 08:25:53.204</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Shutting down pkgdef registry</description>

     </entry>

     <entry>

       <record>22</record>

       <time>2009/05/28 08:25:53.206</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>Released non-volatile pkgdef cache usage tracker</description>

     </entry>

     <entry>

       <record>23</record>

       <time>2009/05/28 08:25:53.208</time>

       <type>Information</type>

       <source>VisualStudio</source>

       <description>PkgDef registry shutdown complete</description>

     </entry>

    </activity>

  8. aaronmar says:

    Tobias & Martin,

    Can you try out the following? Please configure your debugger to include Microsoft public symbols (and also turn on .NET debugging in your VSShellStubExe project) and see if you can at least get a callstack for us?

    http://msdn.microsoft.com/en-us/library/b8ttk8zy.aspx

    I’ve tried several different hunches on what might cause this, but so far I am still unable to repro. Your help would be much appreciated.

    Thanks,

    Aaron

  9. Tobias says:

    Hi Aaron,

    it didn’t help to load the symbols. However I turned on the throwing of C++ exception (void) and got this call stack:

    kernel32.dll!_RaiseException@16() &nbsp;+ 0x58 bytes    
    
    msvcr100.dll!__CxxThrowException@8() &nbsp;+ 0x48 bytes 
    
    clr.dll!AssemblySpecBindingCache::AssemblyBinding::ThrowIfError() &nbsp;+ 0xba008 bytes 
    
    clr.dll!AssemblySpecBindingCache::LookupAssembly() &nbsp;+ 0x136782 bytes   
    
    clr.dll!AssemblySpec::LoadDomainAssembly() &nbsp;+ 0xd2 bytes   
    
    clr.dll!AssemblySpec::LoadAssembly() &nbsp;+ 0x19 bytes 
    
    clr.dll!AssemblyNative::Load() &nbsp;+ 0x1b6 bytes  
    
    mscorlib.ni.dll!6c7d6d23()  
    
    [Frames below may be incorrect and/or missing, no symbols loaded for mscorlib.ni.dll]   
    
    mscorlib.ni.dll!6c7ed288()  
    
    mscorlib.ni.dll!6c7ed5c7()  
    
    mscorlib.ni.dll!6c7b3993()  
    
    mscorlib.ni.dll!6c7b395a()  
    
    mscorlib.ni.dll!6c7b3922()  
    
    clr.dll!_COMToCLRDispatchHelper@28() &nbsp;+ 0x28 bytes 
    
    clr.dll!BaseWrapper&lt;Stub *,FunctionBase&lt;Stub *,&amp;DoNothing&lt;Stub *&gt;,&amp;StubRelease&lt;Stub&gt;,2&gt;,0,&amp;CompareDefault&lt;Stub *&gt;,2&gt;::~BaseWrapper&lt;Stub *,FunctionBase&lt;Stub *,&amp;DoNothing&lt;Stub *&gt;,&amp;StubRelease&lt;Stub&gt;,2&gt;,0,&amp;CompareDefault&lt;Stub *&gt;,2&gt;() &nbsp;+ 0x119bf8 bytes    
    
    clr.dll!COMToCLRWorkerBody() &nbsp;+ 0x80 bytes 
    
    clr.dll!COMToCLRWorkerDebuggerWrapper() &nbsp;+ 0x34 bytes  
    
    clr.dll!_COMToCLRWorker@8() &nbsp;+ 0x119 bytes 
    
    00a6a207()  
    
    msenv.dll!_VsCoCreateAggregatedManagedObject() &nbsp;+ 0xd2 bytes   
    
    msenv.dll!CVsManagedClassFactory::CreateInstance() &nbsp;+ 0x22 bytes   
    
    msenv.dll!CVsLocalRegistry4::CreateInstance() &nbsp;+ 0x1056ea bytes    
    
    msenv.dll!VsLocalCreateInstance() &nbsp;+ 0x49 bytes    
    
    msenv.dll!`anonymous namespace'::GetWpfHostPrivate() &nbsp;+ 0x9bdae bytes  
    
    msenv.dll!Gel::ComponentDispatcher::RegisterComponentForModalTracking() &nbsp;+ 0x1f bytes  
    
    msenv.dll!CMsoComponent::Init() &nbsp;+ 0xbd bytes  
    
    msenv.dll!InitComponentMgr() &nbsp;+ 0xc4 bytes 
    
    msenv.dll!InitThread() &nbsp;+ 0x71 bytes   
    
    msenv.dll!InitFMain() &nbsp;+ 0x233 bytes   
    
    msenv.dll!VStudioMainLogged() &nbsp;+ 0xdc bytes    
    
    msenv.dll!_VStudioMain() &nbsp;+ 0x74 bytes 
    
    AppenvStub.dll!util_CallVsMain() &nbsp;+ 0xd5 bytes 
    
    AppenvStub.dll!CAppEnvId::Run() &nbsp;+ 0x77f bytes 
    
    AppenvStub.dll!_Start() &nbsp;+ 0xca bytes  
    

    VSShellStub2.exe!WinMain(HINSTANCE__ * hInstance=0x00160000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x004a22d8, int nCmdShow=1)  Line 72 + 0x19 bytes C++

    VSShellStub2.exe!__tmainCRTStartup() &nbsp;Line 527 + 0x1c bytes    C
    
    kernel32.dll!@BaseThreadInitThunk@12() &nbsp;+ 0x12 bytes   
    
    ntdll.dll!___RtlUserThreadStart@8() &nbsp;+ 0x27 bytes  
    
    ntdll.dll!__RtlUserThreadStart@8() &nbsp;+ 0x1b bytes   
    

    I also ran the WinDbg-tool and got this stack trace:

    ————-Start—————————————-

    Fri May 29 16:51:40.421 2009 (GMT+2): (670.bb8): C++ EH exception – code e06d7363 (first chance)

    Fri May 29 16:51:40.461 2009 (GMT+2): (670.bb8): CLR exception – code e0434352 (first chance)

    Fri May 29 16:51:40.494 2009 (GMT+2): ModLoad: 71530000 71541000   C:Program FilesCommon FilesMicrosoft SharedVS7Debugcoloader80.dll

    Fri May 29 16:51:40.517 2009 (GMT+2): ModLoad: 75c60000 75cbf000   C:Windowssystem32sxs.dll

    Fri May 29 16:51:40.537 2009 (GMT+2): (670.bb8): C++ EH exception – code e06d7363 (first chance)

    Fri May 29 16:51:40.561 2009 (GMT+2): (670.bb8): CLR exception – code e0434352 (first chance)

    ————End——————————————

    Does that help you in any way?

    Tobias

  10. aaronmar says:

    This means its an assembly load error that’s causing the issue. Can you launch FusLogVw.exe (elevated on Vista), and then repro the error? The Fusion Log Viewer should then show you which assembly was unable to be loaded properly.

  11. Tobias says:

    Done. I got this log:

    —————-Start———————

    *** Assembly Binder Log Entry  (02.06.2009 @ 17:32:23) ***

    The operation failed.

    Bind result: hr = 0x80070002. Das System kann die angegebene Datei nicht finden.

    Assembly manager loaded from:  C:WindowsMicrosoft.NETFrameworkv4.0.20506clr.dll

    Running under executable  C:UserstestDocumentsVisual Studio 10ProjectsVSShellStub2DebugVSShellStub2.exe

    — A detailed error log follows.

    === Pre-bind state information ===

    LOG: User = test-PCtest

    LOG: DisplayName = Microsoft.VisualStudio.Gel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

    (Fully-specified)

    LOG: Appbase = file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/

    LOG: Initial PrivatePath = NULL

    LOG: Dynamic Base = NULL

    LOG: Cache Base = NULL

    LOG: AppName = VSShellStub2.exe

    Calling assembly : (Unknown).

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:UserstestDocumentsVisual Studio 10ProjectsVSShellStub2DebugVSShellStub2.exe.Config

    LOG: Using host configuration file:

    LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.20506configmachine.config.

    LOG: Post-policy reference: Microsoft.VisualStudio.Gel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

    LOG: GAC Lookup was unsuccessful.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Microsoft.VisualStudio.Gel.DLL.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Microsoft.VisualStudio.Gel/Microsoft.VisualStudio.Gel.DLL.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Extensions/Microsoft.VisualStudio.Gel.DLL.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Extensions/Microsoft.VisualStudio.Gel/Microsoft.VisualStudio.Gel.DLL.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Microsoft.VisualStudio.Gel.EXE.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Microsoft.VisualStudio.Gel/Microsoft.VisualStudio.Gel.EXE.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Extensions/Microsoft.VisualStudio.Gel.EXE.

    LOG: Attempting download of new URL file:///C:/Users/test/Documents/Visual Studio 10/Projects/VSShellStub2/Debug/Extensions/Microsoft.VisualStudio.Gel/Microsoft.VisualStudio.Gel.EXE.

    LOG: All probing URLs attempted and failed.

    ————————-End————————-

    Anything?

  12. aaronmar says:

    Hi Tobias,

    Please contact me offline at the following link so we can debug this further:

    http://blogs.msdn.com/aaronmar/contact.aspx

    Thanks,

    Aaron

  13. aaronmar says:

    We’ve figured out that this problem with the isolated shell occurs when the "organization name" of your machine is empty. We will fix the issue in the next release of the Visual Studio SDK.

    In the meantime, there is a very simple workaround. Open up your pkgdef file in the VSShellStub project and look for the "RegistryRoot" entry. Change the double-backslash \ into a single backslash .

    For example, change this:

    "RegistryRoot"="Software\VSShellStub11.0"

    to this:

    "RegistryRoot"="SoftwareVSShellStub11.0"