I was trying to run System.Windows.Forms HelloWorld application on mono 2.10.8 on MacOsX Lion.
Everything went well, unless I exported MONO_MWF_MAC_FORCE_X11 variable.
Could anybody help me?
I want to try this application under X11, but I got the following message:
(I have XQuartz installed)
X does not support your locale
Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme
Unhandled Exception: System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipCreateFromXDrawable_linux (intptr,intptr,intptr&)
at System.Drawing.Graphics.FromXDrawable (IntPtr drawable, IntPtr display) [0x00000] in <filename unknown>:0
at System.Drawing.Graphics.FromHwnd (IntPtr hwnd) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at HelloWorld..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
at HelloWorld.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipCreateFromXDrawable_linux (intptr,intptr,intptr&)
at System.Drawing.Graphics.FromXDrawable (IntPtr drawable, IntPtr display) [0x00000] in <filename unknown>:0
at System.Drawing.Graphics.FromHwnd (IntPtr hwnd) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
at HelloWorld..ctor () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
at HelloWorld.Main () [0x00000] in <filename unknown>:0
It seems to be a bug of newer mono versions,
it worked with older mono versions (< 2.10.5).
You can download them from here
Related
After update to xamarin forms 3.6->4.2, prism.Autofac.Forms 7.0->7.1, and xamarin.android.support.% 28.0.0.1->28.0.0.3 I'm getting
System.TypeLoadException
Message=VTable setup of type Prism.Autofac.AutofacContainerExtension failed
stack trace:
at Prism.PrismApplicationBase.Initialize () [0x00000] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:130
at Prism.PrismApplicationBase.InitializeInternal () [0x00006] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:84
at Prism.PrismApplicationBase..ctor (Prism.IPlatformInitializer platformInitializer, System.Boolean setFormsDependencyResolver) [0x00038] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:75
at Prism.PrismApplicationBase..ctor (Prism.IPlatformInitializer platformInitializer) [0x00000] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:57
at Prism.Autofac.PrismApplication..ctor (Prism.IPlatformInitializer platformInitializer) [0x00000] in D:\a\1\s\Source\Xamarin\Prism.Autofac.Forms\PrismApplication.cs:30
at DisMobi.App..ctor (Prism.IPlatformInitializer initializer) [0x00000] in C:...........\App.xaml.cs:28
at xxxxxx.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00079] in C:..........\xxxxxx.Android\MainActivity.cs:35
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in :0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.3(intptr,intptr,intptr)
I am trying to implement Overlay view from the Link. In android it is working fine but showing System.MissingMethodException on UIApplication.Main(args, null, "AppDelegate");
Upadated
System.MissingMethodException: Default constructor not found for type VenkysHRMS.iOS.ShowOverlay
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/corlib/ReferenceSources/RuntimeType.cs:171
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/rttype.cs:5639
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00039] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/activator.cs:201
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/activator.cs:134
at Xamarin.Forms.DependencyService.Get[T] (Xamarin.Forms.DependencyFetchTarget fetchTarget) [0x00065] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\DependencyService.cs:35
at VenkysHRMS.View.Login+<OnCreate>d__2.MoveNext () [0x0001b] in /Users/mac/Desktop/VenkysHRMS/VenkysHRMS/VenkysHRMS/View/Login.xaml.cs:33
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/UIKit/UIKitSynchronizationContext.cs:24
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/Foundation/NSAction.cs:163
at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/UIKit/UIApplication.cs:63
at VenkysHRMS.iOS.Application.Main (System.String[] args) [0x00001] in /Users/mac/Desktop/VenkysHRMS/VenkysHRMS/VenkysHRMS.iOS/Main.cs:17
I'm working with EF 5 in visual studio mac. The same solution is working on Windows machine But in mac it is giving the error
System.Data.Entity.Core.MetadataException
Unable to load the specified metadata resource.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): EntityFramework.
Exception stack trace:
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources (System.String assemblyName, System.String resourceName, System.Collections.Generic.ICollection1[T] uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00075] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource..ctor (System.String originalPath, System.String assemblyName, System.String resourceName, System.Collections.Generic.ICollection1[T] uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x0000d] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderCompositeResource.CreateResourceLoader (System.String path, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader+ExtensionCheck extensionCheck, System.String validExtension, System.Collections.Generic.ICollection1[T] uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00038] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader.Create (System.String path, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader+ExtensionCheck extensionCheck, System.String validExtension, System.Collections.Generic.ICollection1[T] uriRegistry, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactAssemblyResolver resolver) [0x00008] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader.Create (System.String path, System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoader+ExtensionCheck extensionCheck, System.String validExtension, System.Collections.Generic.ICollection1[T] uriRegistry) [0x00009] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.SplitPaths (System.String paths) [0x00122] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Common.Utils.Memoizer2+<>c__DisplayClass2[TArg,TResult].b__0 () [0x00000] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Common.Utils.Memoizer2+Result[TArg,TResult].GetValue () [0x0002c] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Common.Utils.Memoizer2[TArg,TResult].Evaluate (TArg arg) [0x0007d] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetArtifactLoader (System.Data.Entity.Core.EntityClient.Internal.DbConnectionOptions effectiveConnectionOptions) [0x00014] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetMetadataWorkspace (System.Data.Entity.Core.EntityClient.Internal.DbConnectionOptions effectiveConnectionOptions) [0x00000] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.EntityClient.EntityConnection.GetMetadataWorkspace () [0x0000f] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection () [0x00014] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.Data.Entity.Core.EntityClient.EntityConnection connection, System.Boolean isConnectionConstructor, System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlanFactory objectQueryExecutionPlanFactory, System.Data.Entity.Core.Common.Internal.Materialization.Translator translator, System.Data.Entity.Core.Query.InternalTrees.ColumnMapFactory columnMapFactory) [0x000ea] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Core.Objects.ObjectContext..ctor (System.Data.Entity.Core.EntityClient.EntityConnection connection) [0x00000] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Internal.InternalConnection.CreateObjectContextFromConnectionModel () [0x00006] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel () [0x00006] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext () [0x0007c] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Internal.InternalContext.Initialize () [0x00000] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes () [0x0000f] in <000f54522ad145bf987b3043022f9799>:0
at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext () [0x00006] in <000f54522ad145bf987b3043022f9799>:0
at ODIR.DataAccess.EntityModel.OnlineDirectory_DevEntities.USP_GETUSERINFO (System.String username, System.String password) [0x0004b] in /Users/hanishmaram/WorkSpace/svn_projects/trunk/ODIR.DataAccess/EntityModel/DataRepository.Context.cs:69
at ODIR.DataAccess.UserContext.GetUserInfo (System.String username, System.String password) [0x0000a] in /Users/hanishmaram/WorkSpace/svn_projects/trunk/ODIR.DataAccess/Context/UserContext.cs:35
at ODIR.Controllers.HomeController.Index (System.String username, System.String password) [0x00007] in /Users/hanishmaram/WorkSpace/svn_projects/trunk/ODIR.Controllers/HomeController.cs:27
at (wrapper dynamic-method) System.Object:lambda_method (System.Runtime.CompilerServices.Closure,System.Web.Mvc.ControllerBase,object[])
at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc.ControllerBase controller, System.Object[] parameters) [0x00000] in :0
at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc.ControllerContext controllerContext, System.Collections.Generic.IDictionary2[TKey,TValue] parameters) [0x00072] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionDescriptor actionDescriptor, System.Collections.Generic.IDictionary2[TKey,TValue] parameters) [0x00000] in :0
at System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation.InvokeSynchronousActionMethod () [0x00000] in :0
at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39 (System.IAsyncResult asyncResult, System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation innerInvokeState) [0x00000] in :0
at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeDelegate2[System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation,System.Web.Mvc.ActionResult]:invoke_TResult_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.Async.AsyncControllerActionInvoker/ActionInvocation)
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult2[TResult,TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d () [0x00014] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f () [0x00086] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32 (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult1[TResult].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21+<>c__DisplayClass2b.<BeginInvokeAction>b__1c () [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21.<BeginInvokeAction>b__1e (System.IAsyncResult asyncResult) [0x00041] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult1[TResult].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase1[TResult].End () [0x00029] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d (System.IAsyncResult asyncResult, System.Web.Mvc.Controller+ExecuteCoreState innerState) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeVoidDelegate1[System.Web.Mvc.Controller+ExecuteCoreState]:invoke_void_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.Controller/ExecuteCoreState)
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase1[TResult].End () [0x00029] in :0
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in :0
at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in :0
at System.Web.Mvc.Controller.EndExecuteCore (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.Controller.b__15 (System.IAsyncResult asyncResult, System.Web.Mvc.Controller controller) [0x00000] in :0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in <cc73190bab9d435c831510ff295c572a>:0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase1[TResult].End () [0x00029] in :0
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in :0
at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in :0
at System.Web.Mvc.Controller.EndExecute (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.MvcHandler.b__5 (System.IAsyncResult asyncResult, System.Web.Mvc.MvcHandler+ProcessRequestState innerState) [0x00000] in :0
at (wrapper delegate-invoke) System.Web.Mvc.Async.EndInvokeVoidDelegate1[System.Web.Mvc.MvcHandler+ProcessRequestState]:invoke_void_IAsyncResult_TState (System.IAsyncResult,System.Web.Mvc.MvcHandler/ProcessRequestState)
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid1[TState].CallEndDelegate (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1[TResult].End () [0x00029] in :0
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult] (System.IAsyncResult asyncResult, System.Object tag) [0x00007] in :0
at System.Web.Mvc.Async.AsyncResultWrapper.End (System.IAsyncResult asyncResult, System.Object tag) [0x00000] in :0
at System.Web.Mvc.MvcHandler.EndProcessRequest (System.IAsyncResult asyncResult) [0x00000] in :0
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest (System.IAsyncResult result) [0x00000] in :0
at System.Web.HttpApplication.async_handler_complete_cb (System.IAsyncResult ar) [0x00015] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Web/System.Web
Please let me know where the issue is happening in mac.
Using Xamarin XS v5.5, AutoMapper v3.2.1,
I get this runtime error in Release build (not in Debug):
This type is not supported on this platform INullableConverterFactory
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException:
An exception was thrown by the type initializer for AutoMapper.Mappers.MapperRegistry --->
System.TypeInitializationException:
An exception was thrown by the type initializer for AutoMapper.Mappers.EnumMapper --->
System.PlatformNotSupportedException: This type is not supported on this platform INullableConverterFactory
[mono-rt] at AutoMapper.Internal.PlatformAdapter.Resolve[INullableConverterFactory] (Boolean throwIfNotFound) [0x00000] in <filename unknown>:0
[mono-rt] at AutoMapper.Mappers.EnumMapper..cctor () [0x00000] in <filename unknown>:0
[mono-rt] --- End of inner exception stack trace ---
[mono-rt] at AutoMapper.Mappers.MapperRegistry..cctor () [0x00000] in <filename unknown>:0
[mono-rt] --- End of inner exception stack trace ---
[mono-rt] at AutoMapper.Mapper.Reset () [0x00000] in <filename unknown>:0
[mono-rt] at AutoMapper.Mapper.Initialize (System.Action`1 action) [0x00000] in <filename unknown>:0
[mono-rt] at MyApp.Android.MainActivity.ConfigMapper () [0x00000] in <filename unknown>:0
[mono-rt] at MyApp.Android.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00000] in <filename unknown>:0
[mono-rt] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00000] in <filename unknown>:0
[mono-rt] at (wrapper dynamic-method) object:3cc570cf-1f33-4513-b6e4-0e910820d0ba (intptr,intptr,intptr)
What could the issue be?
It's most likely the linker removing that type from the AutoMapper assembly..
Usually RELEASE mode has the linker set to SDK Assemblies or ALL Assemblies where as DEBUG doesn't do any linking
Check here how to modify what's linked
https://developer.xamarin.com/guides/cross-platform/advanced/custom_linking/
I had the same exception and adding this fellow in fixed it
<assembly fullname="AutoMapper">
<type fullname="*INullableConverterFactory*" />
<type fullname="*MappingExpression*" />
</assembly>
I'm able to host a small MVC3 application on Mono, but when trying to host my real site, I get some exceptions.
Versions:
Mono 2.10.6
C#4
MVC3 using Razor
NHibernate 3.1.0.4
FluentNHibernate 1.2.0.712
MySql.Data 6.4.4.0
MvcContrib 3.0.51.0
Here I'm trying to run xsp4 on my Windows box, but I get the same error on Linux.
I don't get any additional information using --verbose. Does anybody know why this error occur, or how I can get some additional information on the error?
Handling exception type TargetInvocationException
Message is Exception has been thrown by the target of an invocation.
IsTerminating is set to True
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Server stack trace:
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
at System.Runtime.Serialization.ObjectRecord.LoadData (System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector selector, StreamingContext context) [0x00000] in :0
at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000] in :0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader reader) [0x00000] in :0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000]
in :0
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in :0
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000] in :0
at System.Runtime.Remoting.RemotingServices.DeserializeCallData (System.Byte[] array) [0x00000] in :0
at (wrapper xdomain-dispatch) System.AppDomain:DoCallBack (object,byte[]&,byte[]&)
Exception rethrown at [0]:
---> System.ArgumentException: Couldn't bind to method 'SetHostingEnvironment'.
at System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in :0
at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in :0
at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method) [0x00000] in :0
at System.DelegateSerializationHolder+DelegateEntry.DeserializeDelegate (System.Runtime.Serialization.SerializationInfo info) [0x00000] in :0
at System.DelegateSerializationHolder..ctor (System.Runtime.Serialization.SerializationInfo info, StreamingContext ctx) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
--- End of inner exception stack trace ---
at (wrapper xdomain-invoke) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in :0
at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in :0
at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in :0
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation.
Server stack trace:
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
at System.Runtime.Serialization.ObjectRecord.LoadData (System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector selector, StreamingContext context) [0x00000] in :0
at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000] in :0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader reader) [0x00000] in :0
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000]
in :0
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000] in :0
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000] in :0
at System.Runtime.Remoting.RemotingServices.DeserializeCallData (System.Byte[] array) [0x00000] in :0
at (wrapper xdomain-dispatch) System.AppDomain:DoCallBack (object,byte[]&,byte[]&)
Exception rethrown at [0]:
---> System.ArgumentException: Couldn't bind to method 'SetHostingEnvironment'.
at System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in :0
at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in :0
at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method) [0x00000] in :0
at System.DelegateSerializationHolder+DelegateEntry.DeserializeDelegate (System.Runtime.Serialization.SerializationInfo info) [0x00000] in :0
at System.DelegateSerializationHolder..ctor (System.Runtime.Serialization.SerializationInfo info, StreamingContext ctx) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
--- End of inner exception stack trace ---
at (wrapper xdomain-invoke) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in :0
at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in :0
at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in :0
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in :0
I found the reason. I had several System.Web.* dll's in by bin folder. Removing these fixes the problem.
The problem persists on MVC 4/5 too. The dll is System.Web.dll. It must be deleted when publishing to mono.
Create a Mvc project with Xamarin. The dll that you need will be in the bin folder. Will work just fine