Skip to content
This repository was archived by the owner on Oct 17, 2018. It is now read-only.

The Microsoft.AspNet.Cryptography.Internal library does not load on Mono #55

Closed
borgdylan opened this issue Feb 27, 2015 · 6 comments
Closed

Comments

@borgdylan
Copy link

This library is using some custom attribute that is not normally used causing a crash on Mono:

dylan@ubuntu-server:/var/www/Code/dylannet/vnext/mypim$ k web
Can't find custom attr constructor image: /home/dylan/.k/packages/Microsoft.AspNet.Cryptography.Internal/1.0.0-beta4-10923/lib/aspnet50/Microsoft.AspNet.Cryptography.Internal.dll mtoken: 0x0a000004
* Assertion at class.c:5748, condition `!mono_loader_get_last_error ()' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at Microsoft.Framework.DependencyInjection.DataProtectionServiceCollectionExtensions.AddDataProtection (Microsoft.Framework.DependencyInjection.IServiceCollection,Microsoft.Framework.ConfigurationModel.IConfiguration) <0x0004b>
  at Microsoft.Framework.DependencyInjection.MvcServiceCollectionExtensions.ConfigureDefaultServices (Microsoft.Framework.DependencyInjection.IServiceCollection,Microsoft.Framework.ConfigurationModel.IConfiguration) <0x00027>
  at Microsoft.Framework.DependencyInjection.MvcServiceCollectionExtensions.AddMvc (Microsoft.Framework.DependencyInjection.IServiceCollection,Microsoft.Framework.ConfigurationModel.IConfiguration) <0x00017>
  at mypim.Startup.ConfigureServices (Microsoft.Framework.DependencyInjection.IServiceCollection) <0x0001f>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
* Assertion at loader.c:1908, condition `!mono_loader_get_last_error ()' not met

Aborted (core dumped)

@borgdylan
Copy link
Author

This appears to be the fault of DefaultDllImportSearchPathsAttribute which is not existent on Mono. If this where in the reference sources, The Mono team could add it.

@borgdylan
Copy link
Author

This library will load as the latest Mono master.

@GrabYourPitchforks
Copy link
Contributor

Resolving as external, see https://bugzilla.xamarin.com/show_bug.cgi?id=27427.

@ryan1234
Copy link

ryan1234 commented Mar 4, 2015

Looking for some options here. The link says it is resolved, but not in the runtime. Also I can't find any reference to DefaultDllImportSearchPaths in master on Github (https://github.com/mono/mono/search?utf8=%E2%9C%93&q=DefaultDllImportSearchPaths).

There may be some implicit steps you guys know that I'm missing to get the fix the Mono team provided.

@GrabYourPitchforks
Copy link
Contributor

The commit to master was mono/mono@23603fe. There's no official redist for it yet since it's in master - check http://www.mono-project.com/docs/compiling-mono/ for instructions on how to build from source.

@ryan1234
Copy link

ryan1234 commented Mar 4, 2015

Thanks for the note. I was searching the repo for "DefaultDllImportSearchPaths" and couldn't find it. That commit link helped a bunch!

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

No branches or pull requests

3 participants