i get this error. what cause this? must all asset owners change their precompiled libraries to make them compatible with phone 8 and windows store apps?
Error building Player: Exception: Failed to run assembly preprocessor with cmdline “Temp/StagingArea\Data/Managed\EasyRoads3D.dll” -injectCtor -assemblyPath “Temp/StagingArea\Managed” -pdb.[Temp/StagingArea\Data/Managed\EasyRoads3D.dll]
No symbols for Temp/StagingArea\Data/Managed\EasyRoads3D.dll
Injecting ctor
Error while in assembly preprocessor Temp/StagingArea\Data/Managed\EasyRoads3D.dll
The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at AssemblyPreprocessor.ConstructorInjector.GetBaseConstructorMethodFor(MethodDefinition constructor, Dictionary2 map)
at AssemblyPreprocessor.ConstructorInjector.CreateBodyInvokingBaseConstructor(TypeDefinition parentType, MethodDefinition constructor, Dictionary`2 map)
at AssemblyPreprocessor.ConstructorInjector.InjectConstructorsForTypesIn(ModuleDefinition moduleDefinition)
at AssemblyPreprocessor.Program.Main(String[ ] args)
package owner said he build this dll with visual studio. can it be the reason of this error? he will also build this dll with monodevelop and i will test it.
Hey guys, I’m getting a similar error when I try to build for Windows Store. Any ideas as to what might be causing it? Thanks!
Error building Player: Exception: Failed to run assembly preprocessor with cmdline “Temp/StagingArea\Data/Managed\Assembly-CSharp.dll” -injectCtor -assemblyPath “Temp/StagingArea\Managed” -pdb.[Temp/StagingArea\Data/Managed\Assembly-CSharp.dll]
Symbols will be read from Temp/StagingArea\Data/Managed\Assembly-CSharp.pdb
Injecting ctor
Injecting fast invokes
Error while in assembly preprocessor Temp/StagingArea\Data/Managed\Assembly-CSharp.dll
Object reference not set to an instance of an object.
at AssemblyPreprocessor.FastInvokeInjector.InjectUnityFastInvoke(String targetName, MethodDefinition method, TypeDefinition typeDefinition)
at AssemblyPreprocessor.FastInvokeInjector.InjectFastInvokeFunctions(TypeDefinition typeDefinition)
at AssemblyPreprocessor.FastInvokeInjector.InjectFastDelegateStubsForTypesIn(ModuleDefinition moduleDefinition)
at AssemblyPreprocessor.Program.Main(String[ ] args)
I just started getting this error in 4.3.3 after I successfully built about 20 times yesterday. No differences between yesterday and today except I made a few changes to my .NET 4.5.1 DLL located in Plugins/Metro/ (all changes were private, none of the public functions changed). There are no 3rd party DLLs, only my mock .NET 3.5 DLL in Plugins/ and my true DLL in Plugins/Metro, plus one more DLL in Plugins/ which is just a class that’s shared between Unity’s scripts and the .NET 4.5.1 DLL. I’m going to try wiping the Windows 8 build folder and start again.
Edit: Wiping the Win 8 build folder didn’t help. Neither did rebuilding both the mock and the Metro DLL… I guess maybe I’ll try rebooting next.
The full error:
Error building Player: Exception: Failed to run assembly preprocessor with cmdline "Temp/StagingArea\Data/Managed/Plugins/Metro\Win8StoreLib.dll" -injectCtor -assemblyPath "Temp/StagingArea\Managed" -pdb -out Temp/StagingArea\TempAssemblyPreprocessor\Win8StoreLib.dll.[Temp/StagingArea\Data/Managed/Plugins/Metro\Win8StoreLib.dll]
No symbols for Temp/StagingArea\Data/Managed/Plugins/Metro\Win8StoreLib.dll
Injecting ctor
Injecting fast invokes
Will write pdb
Error while in assembly preprocessor Temp/StagingArea\Data/Managed/Plugins/Metro\Win8StoreLib.dll
Failed to resolve assembly: 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.MetadataBuilder.GetConstantType(TypeReference constant_type, Object constant)
at Mono.Cecil.MetadataBuilder.AddConstant(IConstantProvider owner, TypeReference type)
at Mono.Cecil.MetadataBuilder.AddField(FieldDefinition field)
at Mono.Cecil.MetadataBuilder.AddFields(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
at Mono.Cecil.MetadataBuilder.AddTypeDefs()
at Mono.Cecil.MetadataBuilder.BuildTypes()
at Mono.Cecil.MetadataBuilder.BuildModule()
at Mono.Cecil.ModuleWriter.<BuildMetadata>b__0(MetadataBuilder builder, MetadataReader _)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.ModuleWriter.BuildMetadata(ModuleDefinition module, MetadataBuilder metadata)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
at AssemblyPreprocessor.Program.Main(String[] args)
I discovered the source of my problem, though I can’t understand why it didn’t work. This code in my Plugins/Metro/Win8StoreLib.dll killed it:
public static class SaveFile {
private const UnicodeEncoding stringEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf8;
private const ByteOrder byteOrder = Windows.Storage.Streams.ByteOrder.LittleEndian;
// ... the rest of the class
}
Changing it to this no longer causes Unity to throw the error:
public static class SaveFile {
private static readonly UnicodeEncoding stringEncoding = Windows.Storage.Streams.UnicodeEncoding.Utf8;
private static readonly ByteOrder byteOrder = Windows.Storage.Streams.ByteOrder.LittleEndian;
// ... the rest of the class
}
So it seems even though those consts were private, it couldn’t handle it. Odd.
This however does not kill it:
public static class SaveFile {
private const byte arraySizeLength = 4;
// ... the rest of the class
}