madskristensen / FileNesting

Nest files in Solution Explorer
Other
118 stars 59 forks source link

VS2013 package has a dependency on VS2015 shell assembly #56

Closed 0xfeeddeadbeef closed 8 years ago

0xfeeddeadbeef commented 8 years ago

Installed product versions

When opening any solution first time after Visual Studio starts, a generic error message is displayed.

Steps to recreate

  1. Install Visual Studio 2013
  2. Install File Nesting extension
  3. Launch Visual Studio 2013
  4. Open any solution (Either existing or create new one)

    Current behavior

When opening any solution first time after Visual Studio starts, a generic error message is displayed:

The 'VSPackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\Giorgi.Chakhidze\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml'.

Restarting Visual Studio could help resolve this issue.

From ActivityLog.xml it is clear, that File Nesting depends on Microsoft.VisualStudio.Shell.11.0 assembly Version=14.0.0.0, - a component of Visual Studio 2015 (which is NOT installed).

Relevant entries from ActivityLog.xml:

<entry>
    <record>1404</record>
    <time>2016/04/18 12:18:32.350</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
    <guid>{6C799BC4-0D4C-4172-98BC-5D464B612DCA}</guid>
  </entry>
  <entry>
    <record>1405</record>
    <time>2016/04/18 12:18:32.350</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Unexpected system error mode before loading package [VSPackage]</description>
    <guid>{6C799BC4-0D4C-4172-98BC-5D464B612DCA}</guid>
  </entry>
  <entry>
    <record>1406</record>
    <time>2016/04/18 12:18:32.350</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [VSPackage]</description>
    <guid>{6C799BC4-0D4C-4172-98BC-5D464B612DCA}</guid>
  </entry>
  <entry>
    <record>1407</record>
    <time>2016/04/18 12:18:32.350</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package [VSPackage]</description>
    <guid>{6C799BC4-0D4C-4172-98BC-5D464B612DCA}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>
  <entry>
    <record>1408</record>
    <time>2016/04/18 12:18:32.350</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [VSPackage]</description>
    <guid>{6C799BC4-0D4C-4172-98BC-5D464B612DCA}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.11.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>

Expected behavior

Package that is intended for Visual Studio 2013 should not have dependency on Visual Studio 2015.

0xfeeddeadbeef commented 8 years ago

Temporary workaround: add assembly binding redirect to devenv.exe.config file:

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.Shell.11.0" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0"/>
  </dependentAssembly>
ando23 commented 8 years ago

I can confirm, same error message here. Win7, VS2013 pro, FileNesting 2.4.58. Additionally installed VS2012, but no VS2015.

Your workaround solves the issue. Thank you!

For anyone else having the problem, the file is located here: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\". I added the XML-block right before the "" tag near the end of the file.

wwuck commented 8 years ago

Will there be a new release with this fix anytime soon?