-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix assembly loading on Android #129
Labels
enhancement
New feature or request
Comments
upswing1
changed the title
A break mode occurs in Maui .net androis app. It works fine in Win UI
A break mode occurs in Maui .net android app. It works fine in Win UI
Apr 6, 2023
It seems Android seems specific assembly loading, so someone need to dive in and figure that out 😅 RazorEngineCore/RazorEngineCore/RazorEngine.cs Lines 79 to 104 in c285822
|
adoconnection
changed the title
A break mode occurs in Maui .net android app. It works fine in Win UI
Fix assembly loading on Android
Sep 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running this code
var engine = new RazorEngineCore.RazorEngine();
I get the following error in Android emulator:
Your app has entered a break state, but there is no code to show because all threads were executing external code
This happens under .net MAUI for an android app. It works fine for WINUI
Call stack
0x29 in System.Reflection.ConstructorInvoker.InterpretedInvoke C#
0x4 in System.Reflection.ConstructorInvoker.InlinedInvoke C#
0xBD in System.RuntimeType.CreateInstanceMono C#
0x1F in System.RuntimeType.CreateInstanceDefaultCtor C#
0x30 in System.Activator.CreateInstance C#
0x3 in System.Activator.CreateInstance C#
0x2 in System.Activator.CreateInstance C#
0x48 in Microsoft.Maui.Controls.ShellContent. at D:\a_work\1\s\src\Controls\src\Core\Shell\ShellContent.cs:75,8 C#
0x27 in Microsoft.Maui.Controls.ElementTemplate.CreateContent at D:\a_work\1\s\src\Controls\src\Core\ElementTemplate.cs:85,4 C#
0x8 in Microsoft.Maui.Controls.Internals.DataTemplateExtensions.CreateContent at D:\a_work\1\s\src\Controls\src\Core\DataTemplateExtensions.cs:22,4 C#
0x77 in Microsoft.Maui.Controls.ShellContent.Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent at D:\a_work\1\s\src\Controls\src\Core\Shell\ShellContent.cs:80,5 C#
0x16E in Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.OnCreateView at D:\a_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\Android\ShellSectionRenderer.cs:123,5 C#
0x24 in AndroidX.Fragment.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ at /Users/runner/work/1/s/generated/androidx.fragment.fragment/obj/Release/net6.0-android/generated/src/AndroidX.Fragment.App.Fragment.cs:2031,4 C#
0xD in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLLL_L at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:352,5 C#
I get the following error in actual device
Exception The method or operation is not implemented.
at System.Reflection.Metadata.AssemblyExtensions.TryGetRawMetadata(Assembly assembly, Byte*& blob, Int32& length)
at RazorEngineCore.RazorEngine.<>c.b__4_1(Assembly ass)
at System.Linq.Enumerable.SelectEnumerableIterator
2[[System.Reflection.Assembly, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.CodeAnalysis.PortableExecutableReference, Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() at System.Linq.Enumerable.ConcatIterator
1[[Microsoft.CodeAnalysis.MetadataReference, Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext()at System.Collections.Generic.List
1[[Microsoft.CodeAnalysis.MetadataReference, Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[MetadataReference](IEnumerable
1 source) at RazorEngineCore.RazorEngine.CreateAndCompileToStream(String templateSource, RazorEngineCompilationOptions options) at RazorEngineCore.RazorEngine.Compile(String content, Action
1 builderAction)at ReportsComponents.Reports.ReportGenerator.GenerateReport(String template, Object model) in D:\repos\FeatureReports\FeatureReportsComponents\Reports\ReportGenerator.cs:line 13
template is
`
The text was updated successfully, but these errors were encountered: