Can't Compile MAUI Android on .Net 7.0.400

Julian Mustatea 0 Reputation points
2023-09-06T04:17:57.6666667+00:00

I can't compile a release version of my android app using the latest SDK, i can compile a debug but this is the error i get:

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : Error: Unable to load DLL 'clrjit_unix_x86_x64' or one of its dependencies: The specified module could not be found.

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : System.DllNotFoundException: Unable to load DLL 'clrjit_unix_x86_x64' or one of its dependencies: The specified module could not be found.

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at System.Runtime.InteropServices.NativeLibrary.LoadLibErrorTracker.Throw(String) + 0x79

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String, Assembly, Nullable`1, Boolean) + 0x93

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.JitInterface.JitConfigProvider.<>c__DisplayClass5_0.<Initialize>b__0(String libName, Assembly assembly, Nullable`1 searchPath) + 0xa7

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String, Assembly, Boolean, UInt32) + 0x8b

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.Runtime.CompilerHelpers.InteropHelpers.FixupModuleCell(InteropHelpers.ModuleFixupCell*) + 0x5e

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.Runtime.CompilerHelpers.InteropHelpers.ResolvePInvokeSlow(InteropHelpers.MethodFixupCell*) + 0x2f

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.JitInterface.CorInfoImpl.jitStartup(IntPtr) + 0x27

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at Internal.JitInterface.CorInfoImpl.Startup(CORINFO_OS) + 0x27

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.ReadyToRunCodegenCompilationBuilder.ToCompilation() + 0x431

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary2, InstructionSetSupport, String, Dictionary2, HashSet`1, CompilerTypeSystemContext) + 0x1784

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Run(String[]) + 0xd6b

1>C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.CrossGen.targets(470,5): error : at ILCompiler.Program.Main(String[]) + 0x32

Does anyone have anything i can try or do to prevent this?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,072 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.