Using Microsoft.CodeAnalysis / Roslyn on Mono - c#

I'm trying to run a simple line in Mono, using Microsoft.CodeAnalysis:
var workspace = MSBuildWorkspace.Create();
But the problem is that it seems that it can't load roslyn libraries because we are using Mono:
Unhandled Exception:
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/Assembly.cs:405
at System.Reflection.Assembly+<>c__Iterator0.MoveNext () [0x00021] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/Assembly.cs:999
at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00078] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:282
at System.Linq.Enumerable+<SelectManyIterator>c__Iterator2`2[TSource,TResult].MoveNext () [0x0009a] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:424
at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor (System.Collections.Generic.IEnumerable`1[T] types, System.Composition.Convention.AttributedModelProvider attributeContext) [0x00049] in <c909a8424f424533a07db3f5e57b744b>:0
at System.Composition.Hosting.ContainerConfiguration.CreateContainer () [0x00042] in <c909a8424f424533a07db3f5e57b744b>:0
at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create (System.Collections.Generic.IEnumerable`1[T] assemblies) [0x00019] in <947408acdcbc4eba93cdb6a19d92fcd1>:0
at Microsoft.CodeAnalysis.Host.Mef.DesktopMefHostServices.get_DefaultServices () [0x00011] in <2ba3a08d4fe0467c8c54c8bc37c61987>:0
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create (System.Collections.Generic.IDictionary`2[TKey,TValue] properties) [0x00000] in <2ba3a08d4fe0467c8c54c8bc37c61987>:0
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create () [0x00000] in <2ba3a08d4fe0467c8c54c8bc37c61987>:0
at UTQGValidatorPluginCSharp.Program.CountProject (System.String solutionPath) [0x00001] in /Users/s/projects/xo/devfactory-utqg-csharp/src/UTQGValidatorPluginCSharp/Program.cs:31
at UTQGValidatorPluginCSharp.Program.Main (System.String[] args) [0x00052] in /Users/s/projects/xo/devfactory-utqg-csharp/src/UTQGValidatorPluginCSharp/Program.cs:25
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/Assembly.cs:405
at System.Reflection.Assembly+<>c__Iterator0.MoveNext () [0x00021] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/Assembly.cs:999
at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00078] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:282
at System.Linq.Enumerable+<SelectManyIterator>c__Iterator2`2[TSource,TResult].MoveNext () [0x0009a] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:424
at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor (System.Collections.Generic.IEnumerable`1[T] types, System.Composition.Convention.AttributedModelProvider attributeContext) [0x00049] in <c909a8424f424533a07db3f5e57b744b>:0
at System.Composition.Hosting.ContainerConfiguration.CreateContainer () [0x00042] in <c909a8424f424533a07db3f5e57b744b>:0
at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create (System.Collections.Generic.IEnumerable`1[T] assemblies) [0x00019] in <947408acdcbc4eba93cdb6a19d92fcd1>:0
at Microsoft.CodeAnalysis.Host.Mef.DesktopMefHostServices.get_DefaultServices () [0x00011] in <2ba3a08d4fe0467c8c54c8bc37c61987>:0
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create (System.Collections.Generic.IDictionary`2[TKey,TValue] properties) [0x00000] in <2ba3a08d4fe0467c8c54c8bc37c61987>:0
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create () [0x00000] in <2ba3a08d4fe0467c8c54c8bc37c61987>:0
at UTQGValidatorPluginCSharp.Program.CountProject (System.String solutionPath) [0x00001] in /Users/s/projects/xo/devfactory-utqg-csharp/src/UTQGValidatorPluginCSharp/Program.cs:31
at UTQGValidatorPluginCSharp.Program.Main (System.String[] args) [0x00052] in /Users/s/projects/xo/devfactory-utqg-csharp/src/UTQGValidatorPluginCSharp/Program.cs:25
But according with this thread, Roslyn was completely integrated into Mono.
Is there any way to get it working on Mono? If yes, how should I do this?

Related

Xamarin.Forms.GoogleMaps failed to start on IOS, breaks in UpdateIsShowingUser

[Xamarin.Forms.GoogleMaps][1] is failing when deploying to IOS (in my case iPhone phisical device).
The app is trying to start but then crashes to the OS. Visual Studio does not catch the break point.
In the output window I get this:
Loaded assembly:
/private/var/mobile/Containers/Data/Application/BE8F87C7-8FB5-4F76-9674-03D160780B77/Documents/XFGoogleMapSampleiOS.content/Xamarin.Forms.Xaml.dll
[External] Loaded assembly:
/private/var/containers/Bundle/Application/F4979BA1-4F02-476D-BB93-7A84EE654A10/XFGoogleMapSampleiOS.app/System.Xml.dll
[External] Thread started: #4 Thread started: #5 Thread started: #6 Thread started: #7 Resolved pending breakpoint at 'BasicMapPage.xaml.cs:139,1'
to void XFGoogleMapSample.BasicMapPage.<.ctor>b__0_15 (object sender,
Xamarin.Forms.GoogleMaps.CameraChangedEventArgs args) [0x00008].
Loaded assembly:
/private/var/containers/Bundle/Application/F4979BA1-4F02-476D-BB93-7A84EE654A10/XFGoogleMapSampleiOS.app/System.Net.Http.dll
[External] Loaded assembly:
/private/var/containers/Bundle/Application/F4979BA1-4F02-476D-BB93-7A84EE654A10/XFGoogleMapSampleiOS.app/System.Drawing.Common.dll
[External] [0:] An error occurred: 'Object reference not set to an
instance of an object.'. Callstack: ' at
Xamarin.Forms.GoogleMaps.iOS.MapRenderer.UpdateIsShowingUser
(System.Nullable1[T] initialMyLocationButtonEnabled) <0x119727660 + 0x0007a> in <cae073484d4d4db5b36708f421f24080>:0 at Xamarin.Forms.GoogleMaps.iOS.MapRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs1[TElement] e)
<0x118649e28 + 0x002d0> in :0 at
Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x00134] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:193 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement
(Xamarin.Forms.VisualElement element) [0x00000] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:141 at
Xamarin.Forms.Platform.iOS.Platform.CreateRenderer
(Xamarin.Forms.VisualElement element) [0x00014] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:199 at
Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded
(Xamarin.Forms.VisualElement view) [0x0004f] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:79 at
Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46 at
Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].SetElement (TElement element) [0x000f0] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:180 at Xamarin.Forms.Platform.iOS.VisualElementRenderer1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement
(Xamarin.Forms.VisualElement element) [0x00000] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:141 at
Xamarin.Forms.Platform.iOS.Platform.CreateRenderer
(Xamarin.Forms.VisualElement element) [0x00014] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:199 at
Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded
(Xamarin.Forms.VisualElement view) [0x0004f] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:79 at
Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:46 at
Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:123
at (wrapper managed-to-native)
ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr) at
UIKit.UIViewController.get_View () [0x0002a] in
/Library/Frameworks/Xamarin.iOS.framework/Versions/14.2.0.12/src/Xamarin.iOS/UIKit/UIViewController.g.cs:3267
at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00000]
in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:41
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement
(Xamarin.Forms.VisualElement element) [0x0004f] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:56 at
Xamarin.Forms.Platform.iOS.Platform.CreateRenderer
(Xamarin.Forms.VisualElement element) [0x00014] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:199 at
Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage
(Xamarin.Forms.Page page) [0x00008] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:357
at Xamarin.Forms.Platform.iOS.NavigationRenderer.OnPushAsync
(Xamarin.Forms.Page page, System.Boolean animated) [0x0001d] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:344
at Xamarin.Forms.Platform.iOS.NavigationRenderer.b__42_0
(Xamarin.Forms.Page p) [0x00024] in
D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\NavigationRenderer.cs:228
at
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0
(System.Object state) [0x00000] in
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
at (wrapper delegate-invoke) .invoke_void_object(object) at
Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000]
in
/Library/Frameworks/Xamarin.iOS.framework/Versions/14.2.0.12/src/Xamarin.iOS/Foundation/NSAction.cs:178
--- End of stack trace from previous location where exception was thrown ---
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/14.2.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:86
at UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x0000e] in
/Library/Frameworks/Xamarin.iOS.framework/Versions/14.2.0.12/src/Xamarin.iOS/UIKit/UIApplication.cs:65
at XFGoogleMapSample.iOS.Application.Main (System.String[] args)
[0x00001] in
C:\Projects\Xamarin.Forms.GoogleMaps-master\XFGoogleMapSample\iOS\Main.cs:17
at (wrapper managed-to-native)
System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj,
System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder
binder, System.Object[] parameters, System.Globalization.CultureInfo
culture) [0x0006a] in
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
' The app has been terminated.
First, I tried on my local project. After, I decided to get the source code of the googlemaps libray from git hub and debug it.
It breaks in the MapRenderer.cs
private void UpdateIsShowingUser(bool? initialMyLocationButtonEnabled = null)
{
#pragma warning disable 618
((MapView)Control).MyLocationEnabled = ((Map)Element).IsShowingUser;
((MapView)Control).Settings.MyLocationButton = initialMyLocationButtonEnabled ?? ((Map)Element).IsShowingUser;
#pragma warning restore 618
}
Apparently the native Google.Maps.MapView.Settings is null here. I am not sure what exacly am I doing wrong, but the same library works perfect in Andoid version. It only fails in IOS.
I have set up API keys and API on google developer console.
Visual Studio Version 16.7.7
IOS 14.1
Xamarin.iOS 14.2.0.12
I also tried the standard xamarin google maps lirary and it works fine (it just miss many features comparing to Xamarin.Forms.GoogleMaps)
[1]: https://github.com/amay077/Xamarin.Forms.GoogleMaps

Entity Framework Core SaveChanges causes error on Mac

I'm currently trying to build an EF core project, but when I call db.SaveChanges() I get the following error:
System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.InOutOfProcHelper' threw an exception. ---> System.EntryPointNotFoundException: GetModuleHandle assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Microsoft.Data.Common.SafeNativeMethods.GetModuleHandle(string)
at Microsoft.Data.SqlClient.InOutOfProcHelper..ctor () [0x00006] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.SqlClient.InOutOfProcHelper..cctor () [0x00000] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
--- End of inner exception stack trace ---
at Microsoft.Data.SqlClient.SqlConnectionString..ctor (System.String connectionString) [0x0000d] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions (System.String connectionString, Microsoft.Data.Common.DbConnectionOptions previous) [0x00000] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup (Microsoft.Data.Common.DbConnectionPoolKey key, Microsoft.Data.ProviderBase.DbConnectionPoolGroupOptions poolOptions, Microsoft.Data.Common.DbConnectionOptions& userConnectionOptions) [0x0003e] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.SqlClient.SqlConnection.ConnectionString_Set (Microsoft.Data.Common.DbConnectionPoolKey key) [0x00008] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.SqlClient.SqlConnection.set_ConnectionString (System.String value) [0x0006b] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.SqlClient.SqlConnection..ctor (System.String connectionString, Microsoft.Data.SqlClient.SqlCredential credential) [0x00006] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at Microsoft.Data.SqlClient.SqlConnection..ctor (System.String connectionString) [0x00000] in <a1c8e16fd44948ee8c6a463f125e71f0>:0
at (wrapper remoting-invoke-with-check) Microsoft.Data.SqlClient.SqlConnection..ctor(string)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.CreateDbConnection () [0x00006] in <5c775909c1cf40629fd2452310cf8cc1>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection () [0x0000a] in <5314a29febc14288a1bc53bf7b46d725>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.CreateCommand (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject, System.Guid commandId, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod) [0x0005c] in <5314a29febc14288a1bc53bf7b46d725>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader (Microsoft.EntityFrameworkCore.Storage.RelationalCommandParameterObject parameterObject) [0x00027] in <5314a29febc14288a1bc53bf7b46d725>:0
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1+Enumerator[T].InitializeReader (Microsoft.EntityFrameworkCore.DbContext _, System.Boolean result) [0x00050] in <5314a29febc14288a1bc53bf7b46d725>:0
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult] (TState state, System.Func`3[T1,T2,TResult] operation, System.Func`3[T1,T2,TResult] verifySucceeded) [0x00011] in <5c775909c1cf40629fd2452310cf8cc1>:0
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1+Enumerator[T].MoveNext () [0x00193] in <5314a29febc14288a1bc53bf7b46d725>:0
at System.Linq.Enumerable.SingleOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00041] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/Single.cs:104
at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,Microsoft.EntityFrameworkCore.Query.QueryContext)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult] (System.Linq.Expressions.Expression query) [0x00075] in <a3dbe48366454fdbb51dfeeb0b5c4997>:0
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult] (System.Linq.Expressions.Expression expression) [0x00000] in <a3dbe48366454fdbb51dfeeb0b5c4997>:0
at System.Linq.Queryable.FirstOrDefault[TSource] (System.Linq.IQueryable`1[T] source) [0x0000e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq.Queryable/src/System/Linq/Queryable.cs:729
at GenericEFIAPI.RTATenantsDatabaseHelper.convertTenant (System.String tenantId, GenericEFIAPI.configObject config, GenericEFIAPI.models.TenantDatabase db) [0x002d2] in /Users/jft/projects/GenericAPI/GenericEFIAPI/RTATenantsDatabaseHelper.cs:108
at GenericEFIAPI.Program+<>c__DisplayClass1_0.<Main>b__0 (GenericEFIAPI.Program+Options o) [0x000c1] in /Users/jft/projects/GenericAPI/GenericEFIAPI/Program.cs:78
at CommandLine.ParserResultExtensions.WithParsed[T] (CommandLine.ParserResult`1[T] result, System.Action`1[T] action) [0x00011] in <68c69d6559fd42bc897efd2a474dfda9>:0
at GenericEFIAPI.Program.Main (System.String[] args) [0x00013] in /Users/jft/projects/GenericAPI/GenericEFIAPI/Program.cs:38
I've tried looking around on google for some help, but have come up empty so far... Anybody have any ideas? I'm trying to connect to sql server and using DbContextOptionsBuilder().UseSqlServer() for the underlying connection.
I'm currently getting my old windows laptop up and running to see if it is because I'm on a Mac or not, but I thought I would get this question out there in the mean time.
Alright! So I'm not 100% sure why my connection string is failing when passing it directly to the DbContextOptionsBuilder().UseSqlServer(connectionString), but if I create a SqlConnection object before that, and pass that as the parameter to UseSqlServer, it works.
So got a workaround, but not sure why the error happens when just passing the connection string.

Creating a Xamarin Bindings Library for a Custom iOS Control

Xcode version - 11.1
visual studio - 8.3.3
when using the below command -
sharpie bind --output=GCCheckbox --namespace=GCCheckbox --sdk=iphoneos13.1 /Checkbox/Checkbox/Checkbox.h
......
Binding...
System.Exception: Unsupported clang availability platform: 'macCatalyst'
at Sharpie.Bind.Attributes.AvailabilityBaseAttribute+d__7.MoveNext () [0x003aa] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs:203
at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () [0x0006f] in <3fb92ec709f44a579da6a23087df403d>:0
at Sharpie.Bind.Massagers.AvailabilityMassager.Massage (ICSharpCode.NRefactory.CSharp.EntityDeclaration entity) [0x00092] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:55
at Sharpie.Bind.Massagers.AvailabilityMassager.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration) [0x00000] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:35
at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in :0
at Sharpie.Bind.Massagers.AvailabilityMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00006] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:24
at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in :0
at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in :0
at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00015] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/DocumentSyntaxTree.cs:37
at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, Sharpie.Bind.BindingTarget bindingTarget) [0x00033] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingMassager.cs:136
at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) [0x0010d] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingFrontend.cs:93
at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) [0x0018d] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:166
at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:158
at Clang.Driver.HandleTranslationUnit (System.IntPtr translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:148
at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)
at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) [0x00177] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:139
at Sharpie.ParseTool.Run () [0x005c8] in /Users/builder/vsts/_work/2/s/Sharpie/ParseTool.cs:581
at Sharpie.BindTool.CoreRun () [0x00001] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:117
at Sharpie.BindTool.Run () [0x00026] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:95
Done. Exiting with error code 1.

Firebase modules failed to initialize: auth (missing dependency)

I created a mobile application with unity. For my login I am using the Firebase Email and Password Authentication, After I click the login button this error is coming up on the android device monitor:
05-03 00:18:15.779: E/Unity(28007): InitializationException: Firebase modules failed to initialize: auth (missing dependency)
05-03 00:18:15.779: E/Unity(28007): at Firebase.FirebaseApp.CreateAndTrack (Firebase.CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at Firebase.FirebaseApp.Create () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at Firebase.FirebaseApp.get_DefaultInstance () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at FirebaseScript.btnLoginClientPressed () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at UnityEngine.UI.Button.Press () [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in :0
05-03 00:18:15.779: E/Unity(28007): at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityE
From the emulator of unity the application works fine.

MSBuildWorkspace.Create on mono throws ReflectionTypeLoadException

The following works on vanilla .NET but throws a ReflectionTypeLoadException when I try to run it through mono:
var props = new Dictionary<string, string>();
props["CheckForSystemRuntimeDependency"] = "true";
using (var msWorkspace = MSBuildWorkspace.Create(props))
{
...
Exception is:
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in :0
at System.Reflection.Assembly+<>c__Iterator0.MoveNext () [0x00000] in :0
at System.Linq.Enumerable+c__Iterator102[System.Reflection.TypeInfo,System.Type].MoveNext () [0x00000] in <filename unknown>:0
at System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator122[System.Reflection.Assembly,System.Type].MoveNext () [0x00000] in :0
at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor (IEnumerable1 types, System.Composition.Convention.AttributedModelProvider attributeContext) [0x00000] in <filename unknown>:0
at System.Composition.Hosting.ContainerConfiguration.CreateContainer () [0x00000] in <filename unknown>:0
at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create (IEnumerable1 assemblies) [0x00000] in :0
at Microsoft.CodeAnalysis.Host.Mef.DesktopMefHostServices.get_DefaultServices () [0x00000] in :0
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create (IDictionary`2 properties) [0x00000] in :0
...
Is this a known problem?
For me it helped to manually add all Linq.* libraries to the Project

Categories