Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package does not load correctly #334

Closed
fourpastmidnight opened this issue Oct 13, 2017 · 13 comments
Closed

Package does not load correctly #334

fourpastmidnight opened this issue Oct 13, 2017 · 13 comments

Comments

@fourpastmidnight
Copy link

fourpastmidnight commented Oct 13, 2017

Installed product versions

  • Visual Studio: 2017 Pro (15.4)
  • This extension: 1.11.370

Description

When starting Visual Studio, and then opening a solution with ASP.NET web projects in it, I get the following dialog at VS Startup, and for each ASP.NET project:

Microsoft Visual Studio

The 'WebCompilerInitPackage' 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 ''.

Restarting Visual Studio could help resolve this issue.

Continue to show this message?

[ Yes ] [ No ]

I have tried using your "Clear MEF Component Cache" extension to delete the MEF Component Cache to see if that would resolve the issue, but it hasn't. Also, there was an extension that auto-updated today--and sometimes, these things "work themselves out" when other components update, but alas, that has not happened (yet) either.

Lastly, here's the log output from the ActivityLog.xml file:

LegacySitePackage failed for package [WebCompilerInitPackage]Source:  
'WebCompilerVsix' Description: Could not load file or assembly 'WebCompiler,  Version=1.11.370.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
    The system cannot find the file specified.  
System.IO.FileNotFoundException: Could not load file or assembly 'WebCompiler,  Version=1.11.370.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
    The system cannot find the file specified. 
File name:  'WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null'
    at WebCompilerVsix.WebCompilerInitPackage.Initialize()
    at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider  sp)
    WRN: Assembly binding logging is turned OFF.
         To enable assembly bind failure  logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]  (DWORD) to 1.
         Note: There is some performance penalty associated with assembly  bind failure logging.
         To turn this feature off, remove the registry value  [HKLM\Software\Microsoft\Fusion!EnableLog].
--

Steps to recreate

  1. Install the latest version of this extension
  2. Open Visual Studio. For me, this caused the dialog above to appear.
  3. Open a solution with 1 or more ASP.NET projects in it. For me, for each ASP.NET project in the solution, the above dialog was presented.

Current behavior

YMMV on the steps above, because, as the dialog says, there could be other extensions that are helping to cause this issue. (It could even be as "innocuous" as the order in which the extensions are loaded!)

Expected behavior

The above dialog is not presented when Visual Studio starts and/or when a solution containing 1 or more ASP.NET web projects are loaded.

Remarks

This may possibly be caused by a "corrupted" installation of the extension. I'm going to try removing and then adding back this extension. I'll report back if I have any success.

@fourpastmidnight
Copy link
Author

After uninstalling and then re-installing the extension, the same behavior occurs.

@jerone
Copy link

jerone commented Oct 14, 2017

Same issue:

  <entry>
    <record>1681</record>
    <time>2017/10/14 12:18:27.749</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [WebCompilerInitPackage]</description>
    <guid>{6D96A24D-4D89-3A2F-8FF0-8C3DD4D1A789}</guid>
  </entry>
  <entry>
    <record>1682</record>
    <time>2017/10/14 12:18:27.758</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>LegacySitePackage failed for package [WebCompilerInitPackage]Source: &apos;WebCompilerVsix&apos; Description: Could not load file or assembly &apos;WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null&apos;&#x000D;&#x000A;   at WebCompilerVsix.WebCompilerInitPackage.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
    <guid>{6D96A24D-4D89-3A2F-8FF0-8C3DD4D1A789}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>1683</record>
    <time>2017/10/14 12:18:27.772</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [WebCompilerInitPackage](null)</description>
    <guid>{6D96A24D-4D89-3A2F-8FF0-8C3DD4D1A789}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>1684</record>
    <time>2017/10/14 12:18:27.775</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [WebCompilerInitPackage]</description>
    <guid>{6D96A24D-4D89-3A2F-8FF0-8C3DD4D1A789}</guid>
    <hr>80070002</hr>
    <errorinfo></errorinfo>
  </entry>

@yaorb
Copy link

yaorb commented Oct 16, 2017

I has the same issue:
LegacySitePackage failed for package [WebCompilerPackage]Source: 'WebCompilerVsix' Description: Could not load file or assembly“WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null”or one of its dependencies.
The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly“WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null”.The system cannot find the file specified.
File Name:“WebCompiler, Version=1.11.370.0, Culture=neutral, PublicKeyToken=null”
at WebCompilerVsix.CreateConfig..ctor(Package package)
at WebCompilerVsix.WebCompilerPackage.Initialize() at C:\projects\webcompiler\src\WebCompilerVsix\WebCompilerPackage.cs: row 44
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)

@jerone
Copy link

jerone commented Oct 16, 2017

@djanosik Could this be related to your PR #330 (maybe upgrading .NET from 4.5 to 4.6)?

@djanosik
Copy link
Contributor

djanosik commented Oct 16, 2017

Maybe we need to copy the WebCompiler assembly to output directory when building the extension. At least it's how it works in BundlerMinifier. I didn't know about that.

See: https://github.com/madskristensen/BundlerMinifier/blob/master/src/BundlerMinifierVsix/BundlerMinifierVsix.csproj#L292

@djanosik
Copy link
Contributor

Or maybe it's just necessary to update the extension on marketplace? Is the same exception thrown when using nightly build from http://vsixgallery.com/extension/148ffa77-d70a-407f-892b-9ee542346862/?

@jerone
Copy link

jerone commented Oct 16, 2017

@djanosik commented on Oct 16, 2017, 10:05 AM GMT+2:

Or maybe it's just necessary to update the extension on marketplace? Is the same exception thrown when using nightly build from http://vsixgallery.com/extension/148ffa77-d70a-407f-892b-9ee542346862/?

The version crashing is the one from VSIX Gallery.

@djanosik
Copy link
Contributor

Ok. I will try to update the project file.

@johancyprich
Copy link

I get the same error, but the plugin still works with compiling SCSS.

@jerone
Copy link

jerone commented Oct 16, 2017

@djanosik

This is the content from this extension:
2017-10-16 19_19_24-eseq1phq lyw

Compared to the previous version (different pc):
image

It looks like I'm missing some files and folders.

@djanosik
Copy link
Contributor

@jerone Thank you, it will help.

@djanosik
Copy link
Contributor

It should be fixed in #337. @madskristensen Can you merge it please?

@fourpastmidnight
Copy link
Author

This is fixed for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants