-
Notifications
You must be signed in to change notification settings - Fork 508
I compiled Net Core with EFCore but waiting a long time #7333
Comments
EntityFramework is a big and complex library, so it takes a while to compile to native code. |
Have any example? |
I waiting more than 1 hour and then process terminate Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT
EXEC : warning : RD.XML processing will change before release (https://github.com/dotnet/corert/issues/5001) [/Users/chitpong/Sourcecode/dot-hello/hello.csproj]
Process is terminating due to StackOverflowException.
/var/folders/j_/dz2fhccj2b97xx_lv7mgvnv00000gn/T/tmpa6f40bc79f2049ab8c129c7319a41bd3.exec.cmd: line 2: 65131 Abort trap: 6 "/Users/chitpong/.nuget/packages/runtime.osx-x64.microsoft.dotnet.ilcompiler/1.0.0-alpha-27527-01/tools/ilc" @"obj/release/netcoreapp2.1/osx-x64/native/hello.ilc.rsp"
/Users/chitpong/.nuget/packages/microsoft.dotnet.ilcompiler/1.0.0-alpha-27527-01/build/Microsoft.NETCore.Native.targets(239,5): error MSB3073: The command ""/Users/chitpong/.nuget/packages/runtime.osx-x64.microsoft.dotnet.ilcompiler/1.0.0-alpha-27527-01/tools/ilc" @"obj/release/netcoreapp2.1/osx-x64/native/hello.ilc.rsp"" exited with code 134. [/Users/chitpong/Sourcecode/dot-hello/hello.csproj] Our environment |
I try to use {
"errorType": "Runtime.ExitError",
"errorMessage": "RequestId: 26569e11-3333-4891-a36d-dff625582aaf Error: Runtime exited with error: signal: segmentation fault (core dumped)"
} |
Entity framework is reflection heavy and disabling |
OK, I will try again with RD.XML And last question, How can I get a list of assemblies, types, methods for insert in RD.XML? I use this code to generate RD.XML, correct or not? public static void GetAssemblies()
{
StringBuilder result = new StringBuilder();
result.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?><Directives xmlns=\"http://schemas.microsoft.com/netfx/2013/01/metadata\"><Application>");
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (Assembly asm in assemblies)
{
AssemblyName asmName = asm.GetName();
string name = asmName.Name;
result.Append("<Assembly Name=\"" + name + "\" Dynamic=\"Required All\"></Assembly>\n");
}
result.Append("</Application></Directives>\n");
using (StreamWriter outputFile = new StreamWriter(Path.Combine("./", "rd.xml"), false))
{
outputFile.WriteLine(result);
}
} |
Applying You'll have to do some trial and error. I would suggest starting with the RD.XML in #6477 and tweak it to your needs. |
@MichalStrehovsky ps. I asked @rubin55 and he has reproduced and it's work!. may be a problem from my environment? |
You have to add |
Hey Michal :-) Where would one set this option? Then I'll try and get my little example working again :-) |
Hey Rubin! Just add it to a PropertyGroup in the project. We changed reflection defaults in #6820, but seems like EF has problems with that and Also, we now publish the compiler to a different feed, so you might want to update nuget.config too (#7268). Thanks! |
In your .csproj file <PropertyGroup>
<OutputType>Exe</OutputType>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;linux-x64</RuntimeIdentifiers>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
</PropertyGroup> |
@MichalStrehovsky Alright, I'll get on it. Thanks for the pointer + will also look at the feed shizzle. |
It's compiling again, but I'm getting a new virtual method pointer lookup failure:
It's been a while since I tackled with this, but I seem to remember @MichalStrehovsky explaining to me that you need to add a specific stanza for these kinds of errors in Update: Hah, I ran into this one before, but at the time couldn't always reproduce, see: #6477 (comment) Hah and you mentioned at the time: "That's unfortunate. If you still had the EXE/PDB, we could use the EEType values in the message to look up what's missing. If you hit it again, please save them somewhere!" Alright, I have them: |
I'll try to have a look at this over the weekend. |
I developing some native app and using MySql.Data.EntityFrameworkCore but waiting a long time for compile, I'm not sure to correct or not.
and then I try another code from other (https://github.com/rubin55/dot-hello). it's same
I don't know why?
My Code
https://github.com/ifew/aws-lambda-lambdanative-db/tree/master/src/aws-lambda-lambdanative
My OS: MacOS Mojave
CPU Intel Core i5 2.9 GHz
Memory: 8 GB
px. sorry for bad English
The text was updated successfully, but these errors were encountered: