dotnet / corert

This repo contains CoreRT, an experimental .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying compiler toolchain.
http://dot.net
MIT License
2.91k stars 510 forks source link

[TEMPORARY EXCEPTION MESSAGE] FileLoadErrorGeneric: Microsoft.Management.Infrastructure #7796

Open genifycom opened 4 years ago

genifycom commented 4 years ago

Now getting this strange error:

Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeCoreRT EXEC : error : [TEMPORARY EXCEPTION MESSAGE] FileLoadErrorGeneric: Microsoft.Management.Infrastructure [C:\xxx.csproj] Internal.TypeSystem.TypeSystemException+FileNotFoundException: [TEMPORARY EXCEPTION MESSAGE] FileLoadErrorGeneric: Microsoft.Management.Infrastructure at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID id, String fileName) at ILCompiler.CompilerTypeSystemContext.GetModuleForSimpleName(String simpleName, Boolean throwIfNotFound) at Internal.TypeSystem.Ecma.EcmaModule.ResolveAssemblyReference(AssemblyReferenceHandle handle) at Internal.TypeSystem.Ecma.EcmaModule.EcmaObjectLookupHashtable.CreateValueFromKey(EntityHandle handle) at Internal.TypeSystem.LockFreeReaderHashtable2.CreateValueAndEnsureValueIsInTable(TKey key) at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle handle) at Internal.TypeSystem.Ecma.EcmaModule.ResolveTypeReference(TypeReferenceHandle handle) at Internal.TypeSystem.Ecma.EcmaModule.EcmaObjectLookupHashtable.CreateValueFromKey(EntityHandle handle) at Internal.TypeSystem.LockFreeReaderHashtable2.CreateValueAndEnsureValueIsInTable(TKey key) at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle handle) at Internal.TypeSystem.Ecma.EcmaModule.GetType(EntityHandle handle) at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType(SignatureTypeCode typeCode) at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseMethodSignature() at Internal.TypeSystem.Ecma.EcmaMethod.InitializeSignature() at ILCompiler.DependencyAnalysis.MethodMetadataNode.GetStaticDependencies(NodeFactory factory) at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer2.GetStaticDependenciesImpl(DependencyNodeCore1 node) at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer2.ProcessMarkStack() at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer2.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) C:\Users\DAnderson.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-28121-01\build\Microsoft.NETCore.Native.targets(253,5): error MSB3073: The command ""C:...\runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-28121-01\tools\ilc" @"obj\Debug\netcoreapp2.1\win-x64\native\xxx.ilc.rsp"" exited with code 1. [C:\xxx.csproj]

MichalStrehovsky commented 4 years ago

The app you're trying to compile is incomplete (there's a method referencing types from an assembly that doesn't exist). The assembly name is Microsoft.Management.Infrastructure if that helps: you could try searching for that string in all assemblies mentioned in the obj\Debug\netcoreapp2.1\win-x64\native\xxx.ilc.rsp file.

You can probably work around by adding <IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata> to a PropertyGroup in your main csproj, but ideally you should fix the references.