I created an empty project unity and wrote a simple plugin for windows universal like this link https://mix.office.com/watch/qqsyfebysgrj
but a got a same error when build universal 10:
UnityException: Failed to run assembly converter with command -metadata=0 -platform=uap -lock=“project.lock.json” Temp\StagingArea\Assembly-CSharp.dll.
System.IO.FileNotFoundException: Assembly “Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null” file not found.
at Unity.UWPAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Unity.UWPAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)
at Unity.FixReferencesStep.Visit(MethodDefinition method, GenericContext context)
at Unity.FixReferencesStep.Visit(TypeDefinition type)
at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
at Unity.TypeDefinitionDispatcher…ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
at Unity.FixReferencesStep.ProcessModule()
at Unity.ModuleStep.Execute()
at Unity.FixReferencesStep.Execute()
at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
at Unity.Operation.Execute()
at Unity.Program.Main(String[ ] args)
Could we get a bug report on this? I don’t think we’ve been able to reproduce the issue internally yet. Is Test.dll present in \temp\stagingarea when this error occurs? If not, could you try setting the plugin to “AnySDK” rather than UWP? Maybe there some kind of issue that prevents the DLL from getting copied.
Another problem. I added Facebook SDK in my plugin, but when building complete, I don’t have Facebook.dll . And then I got this error when build Universal 10 in Unity:
UnityException: Failed to run reference rewriter with command --target=“Temp\StagingArea\TestPlugin.dll” --additionalreferences=“Temp\StagingArea” --platform=“C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd” --support=“Temp\StagingArea\WinRTLegacy.dll” --supportpartialns=Unity.Partial --system=System --dbg=pdb --lock=project.lock.json --alt=System.Xml.Serialization;System.Collections,System.Collections.NonGeneric;System.Reflection,System.Reflection.TypeExtensions --ignore=System.IConvertible,mscorlib.
Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’
at Unity.ReferenceRewriter.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Unity.ReferenceRewriter.NuGetAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Unity.ReferenceRewriter.RewriteTypeReferences.Visit(TypeReference type, String referencingEntityName)
at Unity.ReferenceRewriter.ReferenceDispatcher.DispatchFields(TypeDefinition type, String referencingEntityName)
at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch(TypeDefinition type)
at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch()
at Unity.ReferenceRewriter.RewriteTypeReferences.Run()
at Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context)
at Unity.ReferenceRewriter.Program.Main(String[ ] args)
By the way, we’re getting the same error as gamePig, where it says “System.IO.FileNotFoundException: Assembly “Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null” file not found.”
“Windows” isn’t our plugin/assembly, is it? We’ve marked all our WSA plugins as “Any SDK”, but it doesn’t make a difference, because it’s probably some internal assembly that isn’t copied?
Windows assembly is a part of Window SDK, but I am not sure if it doesn’t find Windows assembly from Windows 8.1 SDK or Windows 10 SDK, could we please get a bug report on this?
It seems that the bug hasn’t been tested yet, but even if you haven’t seen the reproduction project, maybe you could give us some ideas, what we could try to work around the issue? We would greatly appreciate it!
It really is a bug on our side, here’s a workaround you can try:
Copy C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.wimd to your exported project directory, next to project.json, it should fix error where it doesn’t find Windows.winmd.
I still got errors after that related to your plugin, but it’s up to you to fix those.