This repo contains CoreRT, an experimental .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying compiler toolchain.
Building the SampleWebApi project in Debug mode works normally, but switching to the Release configuration yields this type error. This is running version 1.0.0-alpha-26730-01:
dotnet publish -r linux-x64 -c Release
EXEC : error : Unable to cast object of type 'ILCompiler.AnalysisBasedMetadataManager' to type 'ILCompiler.UsageBasedMetadataManager'. [/home/matt/projects/corert/samples/WebApi/SampleWebApi.csproj]
System.InvalidCastException: Unable to cast object of type 'ILCompiler.AnalysisBasedMetadataManager' to type 'ILCompiler.UsageBasedMetadataManager'.
at ILCompiler.DependencyAnalysis.TypeMetadataNode.GetStaticDependencies(NodeFactory factory)
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1 node)
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack()
at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes()
at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper)
at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper)
at ILCompiler.Program.Run(String[] args)
at ILCompiler.Program.Main(String[] args)
/home/matt/.nuget/packages/microsoft.dotnet.ilcompiler/1.0.0-alpha-26730-01/build/Microsoft.NETCore.Native.targets(185,5): error MSB3073: The command ""/home/matt/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/1.0.0-alpha-26730-01/tools/ilc" @"obj/Release/netcoreapp2.1/linux-x64/native/SampleWebApi.ilc.rsp"" exited with code 1. [/home/matt/projects/corert/samples/WebApi/SampleWebApi.csproj]
Building the SampleWebApi project in Debug mode works normally, but switching to the Release configuration yields this type error. This is running version
1.0.0-alpha-26730-01
:dotnet publish -r linux-x64 -c Release