Exception: Method 'MS.Internal.Interop.PROPVARIANT..
I’ve used NopCommerce for years and have had very few issues. For the last few days a project which had been working without issue broke down due to a runtime error on my development machine. The error was an unhandled ReflectionTypeLoadException exception but the LoadException properties showed something more obscure – the following error when attempting to load an assembly:
[Exception: Method 'MS.Internal.Interop.PROPVARIANT..ctor(Int32, Int32, Int32,Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32,Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32,Int32, Int32, Int32, Int32, Int32, Int32)' is security transparent, but isa member of a security critical type.]
What threw me off the scent was the fact that I received the same error on my desktop PC and my recently formatted laptop environment. This led me to believe the issue was with the code but, having gone back through GIT and failing to build numerous commits previously deployed to production, I realized that code was not the problem. I validated this by getting the latest version of NopCommerce source from Codeplex, receiving the same issue.
The Real Issue
The issue, then, was environmental. My laptop setup was brand new, so the issue could have been just about anything. Thus I debugged on my desktop. I keep up to date with my development tools and the most recent modification I could remember was an update to Typemock Isolator – a tool that I also installed on my laptop during the refresh. Disabling the Isolator extension in Visual Studio allowed me to run the project successfully. Enabling it again allowed the issue to be replicated. I’ve used Isolator successfully with other projects recently so I don’t think there is an inherent flaw with the product – just a weird edge case worth investigating. I’m off to log a bug report. If you see this message at runtime, try disabling Isolator and see if that helps…
Comments