RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
544 stars 135 forks source link

Error when updating Westwind.Utilities #106

Closed geirsagberg closed 6 years ago

geirsagberg commented 6 years ago

After updating Westwind.Utilities in a project using Westwind.Globalization, I get the error:

[MissingMethodException: Method not found: 'System.Type Westwind.Utilities.ReflectionUtils.GetTypeFromName(System.String)'.]
   Westwind.Web.ScriptCompressionModule.PostResolveRequestCache(Object sender, EventArgs e) +0

This is probably due to changing the signature of GetTypeFromName in https://github.com/RickStrahl/Westwind.Utilities/commit/7d8d85aab109b5a23067899204275f0cb7932e64#diff-f562382ebc25ea7ee3efb39a3c3381d2.

When you change the signature of a method (even just adding an optional parameter), that is a breaking change, and should warrant a major version bump. I know this because I have done the same mistake :)

RickStrahl commented 6 years ago

What versions are the assemblies (WWG and WWU)? I think I fixed this with an update that had overloads for the old signature.

RickStrahl commented 6 years ago

Double checked and that change wasn't actually made - added overload without the second parameter and removed the optional parameter on the new method. This should make the old one still work.

The reason I asked about versions - the set with Westwind.Globalization should have been working - adding a newer copy of Westwind.Utilities is likely what broke?

FWIW, this has bitten me in some other places too which is why I thought I fixed it. Thanks for the reminder. It'll be in 4.

I've rev'd the package to 3.0.9.

geirsagberg commented 6 years ago

The error appeared using WWG 2.1.5 and WWU 3.0.8. As a workaround, downgrading to 3.0.1 fixed it.

Thanks for the quick update, I'll check out 3.0.9 after the holidays :) feel free to close this issue.

geirsagberg commented 6 years ago

Works with 3.0.9, closing.