Skip to content
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

FileNotFoundException: Windows.Foundation.UniversalApiContract #243

Closed
DjArt opened this issue Oct 18, 2020 · 1 comment
Closed

FileNotFoundException: Windows.Foundation.UniversalApiContract #243

DjArt opened this issue Oct 18, 2020 · 1 comment

Comments

@DjArt
Copy link

DjArt commented Oct 18, 2020

Missed file provided by Microsoft.Windows.SDK.Contracts NuGet package.
Stacktrace:

PS E:\Projects\DVRCaptureService\Worker> dotnet publish -r win-x64 -c Release
Microsoft (R) Build Engine версии 16.8.0-preview-20451-02+51a1071f8 для .NET
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

  Определение проектов для восстановления...
  Восстановлен E:\Projects\DVRCaptureService\Worker\Worker.csproj (за 1,18 min).
  Вы используете предварительную версию .NET Core. Дополнительные сведения см. на странице https://aka.ms/dotnet-core-preview.
  Worker -> E:\Projects\DVRCaptureService\Worker\bin\Release\netcoreapp3.1\win-x64\Worker.dll
  Generating native code
  Unhandled exception. Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'Windows.Foundation.UniversalApiContract'
     at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID id, String fileName)
     at ILCompiler.CompilerTypeSystemContext.GetModuleForSimpleName(String simpleName, Boolean throwIfNotFound)
     at ILCompiler.CompilerTypeSystemContext.ResolveAssembly(AssemblyName name, Boolean throwIfNotFound)
     at Internal.TypeSystem.Ecma.EcmaModule.ResolveAssemblyReference(AssemblyReferenceHandle handle)
     at Internal.TypeSystem.Ecma.EcmaModule.EcmaObjectLookupHashtable.CreateValueFromKey(EntityHandle handle)
     at Internal.TypeSystem.LockFreeReaderHashtable`2.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.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
     at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle handle)
     at Internal.TypeSystem.Ecma.EcmaModule.GetType(EntityHandle handle)
     at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl(SignatureTypeCode typeCode)
     at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType(SignatureTypeCode typeCode)
     at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl()
     at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseType()
     at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseFieldSignature()
     at Internal.TypeSystem.Ecma.EcmaField.InitializeFieldType()
     at Internal.TypeSystem.Ecma.EcmaField.get_FieldType()
     at Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeInstanceLayout(DefType defType, InstanceLayoutKind layoutKind)
     at Internal.TypeSystem.DefType.ComputeInstanceLayout(InstanceLayoutKind layoutKind)
     at ILCompiler.CompilerTypeSystemContext.EnsureLoadableTypeUncached(TypeDesc type)
     at ILCompiler.CompilerTypeSystemContext.ValidTypeHashTable.CreateValueFromKey(TypeDesc key)
     at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
     at ILCompiler.CompilerTypeSystemContext.EnsureLoadableType(TypeDesc type)
     at ILCompiler.DependencyAnalysis.EETypeNode..ctor(NodeFactory factory, TypeDesc type)
     at ILCompiler.DependencyAnalysis.ConstructedEETypeNode..ctor(NodeFactory factory, TypeDesc type)
     at ILCompiler.DependencyAnalysis.NodeFactory.CreateConstructedTypeNode(TypeDesc type)
     at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
     at ILCompiler.DependencyAnalysis.NodeFactory.ConstructedTypeSymbol(TypeDesc type)
     at ILCompiler.DependencyAnalysis.NodeFactory.MaximallyConstructableType(TypeDesc type)
     at ILCompiler.DependencyAnalysis.CodeBasedDependencyAlgorithm.AddDependenciesDueToReflectability(DependencyList& dependencies, NodeFactory factory, MethodDesc method)
     at ILCompiler.MetadataManager.GetDependenciesDueToReflectability(DependencyList& dependencies, NodeFactory factory, MethodDesc method)
     at ILCompiler.DependencyAnalysis.CodeBasedDependencyAlgorithm.AddDependenciesDueToMethodCodePresence(DependencyList& dependencies, NodeFactory factory, MethodDesc method)
     at ILCompiler.DependencyAnalysis.ScannedMethodNode.InitializeDependencies(NodeFactory factory, IEnumerable`1 dependencies)
     at ILCompiler.ILScanner.CompileSingleMethod(ScannedMethodNode methodCodeNodeNeedingCode)
     at ILCompiler.ILScanner.<CompileMultiThreaded>b__5_0(Object m)
     at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
     at System.Threading.ThreadPoolWorkQueue.Dispatch()
     at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
C:\Users\luke_\.nuget\packages\microsoft.dotnet.ilcompiler\6.0.0-alpha.1.20515.3\build\Microsoft.NETCore.Native.targets(234,5): error MSB3073: выход из команды ""C:\Users\luke_\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\6.0.0-alpha.1.20515.3\tools\ilc" @"obj\Release\netcoreapp3.1\win-x64\native\Worker.ilc.rsp"" с кодом -532462766. [E:\Projects\DVRCaptureService\Worker\Worker.csproj]
@jkotas
Copy link
Member

jkotas commented Oct 18, 2020

This is WinRT reference. NativeAOT does not support COM and WinRT.

This is duplicate of #182 and dotnet/corert#4219

@jkotas jkotas closed this as completed Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants