This issue has been popping up regularly. it only happens when building Windows Run TimeComponent (not DLL) then attempt to consume it in another UWP project.
It seems like a important file in our winmd goes into a semi locked state. Where if i add a innocuous property that it not referenced by anything like:
public string SelectedNode2 { get; set; }
the winmd builds, but it will not let the app that consumes the winmd build. It spits out a huge error below:
commenting out the prop lets everything work again.
The only way i've seen this issue go away (i think) is Reparing VisualStudio. But that takes an hour, and it didn't seem to work last time.
Has anyone found a way to clear this error???? Seems like a VS bug somehow. It appear that the complier is expecting a set number of strings/properties and if i add an additional one it pukes. Commenting out a different string and bring back the other one
makes it work again.
ErrorTask 'GenerateAppxManifest' failed. Object reference not set to an instance of an object.
followed by this huge error:
Severity
Code
Description
Project
File
Line
Suppression State
Error
The "GenerateAppxManifest" task failed unexpectedly.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IMetadataExpression expression)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IMetadataNamedArgument namedArgument)
at Microsoft.Cci.MetadataTraverser.Traverse(IMetadataNamedArgument namedArgument)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 namedArguments)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(ICustomAttribute customAttribute)
at Microsoft.Cci.MetadataTraverser.Traverse(ICustomAttribute customAttribute)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 customAttributes)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(ITypeDefinitionMember typeMember)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IMethodDefinition method)
at Microsoft.Cci.MetadataTraverser.Traverse(IMethodDefinition method)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 methods)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(ITypeDefinition typeDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamedTypeDefinition namedTypeDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamespaceTypeDefinition namespaceTypeDefinition)
at Microsoft.Cci.MetadataTraverser.Traverse(INamespaceTypeDefinition namespaceTypeDefinition)
at Microsoft.Cci.MetadataTraverser.Dispatcher.Visit(INamespaceTypeDefinition namespaceTypeDefinition)
at Microsoft.Cci.MetadataReader.ObjectModelImplementation.NamespaceType.Dispatch(IMetadataVisitor visitor)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 namespaceMembers)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamespaceDefinition namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IUnitNamespace namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Traverse(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Dispatcher.Visit(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataReader.ObjectModelImplementation.NestedNamespace.Dispatch(IMetadataVisitor visitor)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 namespaceMembers)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamespaceDefinition namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IUnitNamespace namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Traverse(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Dispatcher.Visit(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataReader.ObjectModelImplementation.NestedNamespace.Dispatch(IMetadataVisitor visitor)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 namespaceMembers)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamespaceDefinition namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IUnitNamespace namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Traverse(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Dispatcher.Visit(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataReader.ObjectModelImplementation.NestedNamespace.Dispatch(IMetadataVisitor visitor)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 namespaceMembers)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamespaceDefinition namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IUnitNamespace namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Traverse(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Dispatcher.Visit(INestedUnitNamespace nestedUnitNamespace)
at Microsoft.Cci.MetadataReader.ObjectModelImplementation.NestedNamespace.Dispatch(IMetadataVisitor visitor)
at Microsoft.Cci.MetadataTraverser.Traverse(IEnumerable`1 namespaceMembers)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(INamespaceDefinition namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IUnitNamespace namespaceDefinition)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IRootUnitNamespace rootUnitNamespace)
at Microsoft.Cci.MetadataTraverser.Traverse(IRootUnitNamespace rootUnitNamespace)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IModule module)
at Microsoft.Cci.MetadataTraverser.TraverseChildren(IAssembly assembly)
at Microsoft.Cci.MetadataTraverser.Traverse(IAssembly assembly)
at Microsoft.Build.AppxPackage.WinmdVisitor.Traverse(IAssembly assembly, Boolean swallowTraversalException)
at Microsoft.Build.AppxPackage.WinmdVisitor.Traverse(DefaultHost host, Boolean swallowTraversalException)
at Microsoft.Build.AppxPackage.WinmdVisitor.ProcessInternal(AppxPackagingTaskHelper taskHelper, ITaskItem[] winmdFiles, ITaskItem[] nonFrameworkSdkReferences, ITaskItem[] sdkWinmdFiles, String managedWinmdInprocImplementation, Boolean harvestRegistrationInformation,
Boolean loadMscorlibIntoHost)
at Microsoft.Build.AppxPackage.WinmdVisitor.Process(AppxPackagingTaskHelper taskHelper, ITaskItem[] winmdFiles, ITaskItem[] nonFrameworkSdkReferences, ITaskItem[] sdkWinmdFiles, String managedWinmdInprocImplementation, Boolean harvestRegistrationInformation)
at Microsoft.Build.AppxPackage.GenerateAppxManifest.UpdateWinmdRegistration()
at Microsoft.Build.AppxPackage.GenerateAppxManifest.ProcessDocument()
at Microsoft.Build.AppxPackage.GenerateAppxManifest.ExecuteImplementation()
at Microsoft.Build.AppxPackage.AppxPackagingTaskHelper.Execute()
at Microsoft.Build.AppxPackage.GenerateAppxManifest.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
SDK-TestApp