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

Could not load file or assembly WebActivatorEx #327

Open
kipusoep opened this issue Jan 4, 2016 · 11 comments
Open

Could not load file or assembly WebActivatorEx #327

kipusoep opened this issue Jan 4, 2016 · 11 comments

Comments

@kipusoep
Copy link

kipusoep commented Jan 4, 2016

Installing SquishIt version 0.9.8.1 via NuGet gives the following exception at runtime:

Could not load file or assembly WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4 or one of its dependencies. The system cannot find the file specified.

The dependency WebActivator (≥ 1.4.0) as shown on (this page) isn't there in NuGet's UI and thus not added.

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 5, 2016

Ugh. The original WebActivator package was de-listed. I will need to test with v2 and make sure everything works, i'll try to get 0.9.8.2 out soon I guess. Kind of frustrating that it won't allow installation once it is de-listed, wonder how many other projects that breaks.

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 5, 2016

If you install WebActivatorEx v2.0 does it work?

@kipusoep
Copy link
Author

kipusoep commented Jan 5, 2016

Sorry, didn't check that, reverted to previous SquishIt right away.

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 5, 2016

So there are no hard references to WebActivator anywhere (there will be in v1.0)

Guessing it is probably related to this file that gets transformed by nuget: https://github.com/jetheredge/SquishIt/blob/a00720b09fdd42920aa723944cb2ae1f58507c72/SquishIt.Less/Content/App_Start/SquishItLess.cs.pp

You reverted via git checkout (or similar) right? I would expect the problem to occur regardless of version if you install the preprocessor package after the date WebActivator was delisted.

So if you install/update a preprocessor and experience this problem, I'm guessing the fix will be to install WebActivatorEx on its own. I will update it in future packages once I am done cursing nuget for this.

@kipusoep
Copy link
Author

kipusoep commented Jan 5, 2016

I reverted by installing the previous SquishIt version on NuGet.
The reason this exception occurred is because of Umbraco (CMS). The Boot manager of Umbraco registers plug-ins and scans all assemblies in the AppDomain. During this scan any non-resolvable references throw an exception.

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 5, 2016

Huh, I wouldn't expect the previous version to work either. You are using SquishIt.Less right? It has always referenced WebActivator (not EX).

Anyway you can try this: https://www.nuget.org/packages/SquishIt.Less/0.9.8.2-beta1

@kipusoep
Copy link
Author

kipusoep commented Jan 5, 2016

No I'm talking about the regular SquishIt package. I'm sure it had a
dependency to WebActivator :-/

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 5, 2016

Nah, it shouldn't. v1.0 will, but 0.9.8.1 doesn't have any dependency on WebActivator (hard or soft).

I'll try to look into this some more tomorrow but I don't see where that message would've come from unless you were using a preprocessor.

@kipusoep
Copy link
Author

kipusoep commented Jan 6, 2016

Sorry for the large screenshot and Dutch language ;-)

webactivatorex-exception

Opening the assembly in ILSpy:

webactivatorex-reference

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 6, 2016

This is weird, looks like a 1.0 assembly got pushed with the old package definition. Thanks for pointing this out - I pulled 0.9.8.1 and am working on resolution now.

@AlexCuse
Copy link
Collaborator

AlexCuse commented Jan 6, 2016

Just pushed 0.9.8.2, it should solve the problem. Thanks again for pointing this out!

image

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

2 participants