Bug 27494 - DefaultDllImportSearchPathsAttribute is not available on Mono
Summary: DefaultDllImportSearchPathsAttribute is not available on Mono
Status: RESOLVED DUPLICATE of bug 27427
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2015-02-27 05:19 UTC by Dylan Borg
Modified: 2015-02-27 07:04 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Dylan Borg 2015-02-27 05:19:11 UTC
Recently, ASP.NET 5 has started to use the DefaultDllImportSearchPathsAttribute (in System.Runtime.InteropServices). Since it is not available on Mono, a SEGFAULT happens on load on both Mono 3.12 and 4.0.1 as follows:

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


  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

Can this be added?
Comment 1 Marek Safar 2015-02-27 07:04:09 UTC

*** This bug has been marked as a duplicate of bug 27427 ***