Windows Finishes build then throws 250+ errors

So I just spent the better part of 4 days chasing down compiler errors to build my project to windows (trying all three of these: Windows Phone 8.1, Universal 8.1 and Universal 10. After chasing down build error after error just to reveal a few more build time errors it FINALLY made it to the very end, even going so far as to open up the profiler when I tried to build and run (yes I’ve done both, just build and build/run to same results). So it finishes building and throws another 250 build errors all of which are referencing one dll or another:

Here is the main error:

Reference Rewriter found some errors while running with command --target="Temp\StagingArea\Turret 360.Windows\RAIN.dll" --additionalreferences="Temp\StagingArea\Turret 360.Windows" --platform="C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd" --support="Temp\StagingArea\Turret 360.Windows\WinRTLegacy.dll" --supportpartialns=Unity.Partial --system=System --dbg=pdb --framework="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5.1" --alt=System.Xml.Serialization --ignore=System.IConvertible,mscorlib.
Error: method `System.Reflection.Assembly System.Type::get_Assembly()` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINAction RAIN.Action.RAINAction::LoadActionInstance(System.String,System.String,System.Reflection.Assembly).
Error: method `System.Reflection.Assembly System.Type::get_Assembly()` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINAction RAIN.Action.RAINAction::LoadActionInstance(System.String,System.String,System.Reflection.Assembly).
Error: method `System.Object System.Reflection.Assembly::CreateInstance(System.String)` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINAction RAIN.Action.RAINAction::LoadActionInstance(System.String,System.String,System.Reflection.Assembly).
Error: method `System.Object System.Reflection.Assembly::CreateInstance(System.String)` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINAction RAIN.Action.RAINAction::LoadActionInstance(System.Reflection.Assembly,System.String).
Error: method `System.Object System.Reflection.Assembly::CreateInstance(System.String)` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINAction RAIN.Action.RAINAction::LoadActionInstance(System.Reflection.Assembly,System.String).
Error: method `System.Reflection.Assembly System.Type::get_Assembly()` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINDecision RAIN.Action.RAINDecision::LoadDecisionInstance(System.String,System.String).
Error: method `System.Reflection.Assembly System.Type::get_Assembly()` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINDecision RAIN.Action.RAINDecision::LoadDecisionInstance(System.Reflection.Assembly,System.String).
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Animation.BasicAnimator/BasicAnimatorState>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Animation.BasicAnimator/BasicAnimatorState> RAIN.Animation.BasicAnimator::get_AnimationStates().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Animation.MecanimAnimator/MecanimAnimatorState>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Animation.MecanimAnimator/MecanimAnimatorState> RAIN.Animation.MecanimAnimator::get_AnimationStates().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Entities.Aspects.RAINAspect>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Entities.Aspects.RAINAspect> RAIN.Perception.Sensors.PhysicalSensor::get_Matches().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Core.CustomAIElement>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Core.CustomAIElement> RAIN.Core.AI::get_CustomElements().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Motion.MecanimMotor/MotorParameter>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Motion.MecanimMotor/MotorParameter> RAIN.Motion.MecanimMotor::get_ForwardedParameters().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Navigation.Targets.NavigationTarget>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Navigation.Targets.NavigationTarget> RAIN.Navigation.NavigationManager::get_NavigationTargets().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Navigation.Waypoints.WaypointSet>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Navigation.Waypoints.WaypointSet> RAIN.Navigation.NavigationManager::get_WaypointSets().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Navigation.Graph.RAINNavigationGraph>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Navigation.Graph.RAINNavigationGraph> RAIN.Navigation.NavigationManager::get_NavigationGraphs().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Navigation.NavMesh.NavMeshPathGraph>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Navigation.NavMesh.NavMeshPathGraph> RAIN.Navigation.NavigationManager::get_NavMeshGraphs().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<RAIN.Navigation.Graph.RAINNavigationGraph>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<RAIN.Navigation.Graph.RAINNavigationGraph> RAIN.Navigation.NavigationManager::get_CustomGraphs().
Error: method `System.Collections.ObjectModel.ReadOnlyCollection`1<!0> System.Collections.Generic.List`1<System.String>::AsReadOnly()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Collections.Generic.IList`1<System.String> RAIN.Navigation.NavMesh.NavMesh::get_GraphTags().
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.NavMesh::CreateAllContours().
Error: method `System.Void System.Threading.Thread::Sleep(System.Int32)` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.NavMesh::CreateAllContours().
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Navigation.NavMesh.RecastProcess.ContourCreator.
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Boolean RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::get_Asynchronous().
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Boolean RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::get_Asynchronous().
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.ThreadStart` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: method `System.Void System.Threading.ThreadStart::.ctor(System.Object,System.IntPtr)` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.ThreadStart` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: method `System.Void System.Threading.Thread::.ctor(System.Threading.ThreadStart)` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: method `System.Void System.Threading.Thread::Start()` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::.ctor(UnityEngine.Matrix4x4,UnityEngine.Vector3,UnityEngine.Vector3,UnityEngine.Transform,UnityEngine.LayerMask,System.Collections.Generic.List`1<System.String>,System.Collections.Generic.List`1<System.String>,System.Single,System.Single,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Single,System.Int32).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Boolean RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::CreateContours(System.Collections.Generic.List`1<RAIN.Navigation.NavMesh.RecastNodes.PolyMeshData>&).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Boolean RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::CreateContours(System.Collections.Generic.List`1<RAIN.Navigation.NavMesh.RecastNodes.PolyMeshData>&).
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void RAIN.Navigation.NavMesh.RecastProcess.ContourCreator::CancelCreatingContours().
Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at System.Void

and one of the many similar errors

Reference rewriter: Error: method `System.Object System.Reflection.Assembly::CreateInstance(System.String)` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Action.RAINAction RAIN.Action.RAINAction::LoadActionInstance(System.String,System.String,System.Reflection.Assembly).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:591)
PostProcessUniversal81:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:123)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:126)
PostProcessUniversal81:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:42)
UnityEditor.HostView:OnGUI()

I updated my project from 5.1.4 a while ago and just got around to testing the windows builds. In 5.1.4 most of these dll’s were already present and built just fine on my test device (Windows phone 8.1) with MINIMAL effort. I’m now using Unity 5.3.6f1, with the Windows store module with both backends (.net and ilc2pp) and Visual Studio 2015 with all the SDK’s. ilc2pp doesn’t hardly start to compile without throwing errors. .net now finishes and then throws the Reference rewriter errors. What can I do? These are DLL’s from asset store purchases, many of which build fine in the older Windows Phone build…

API’s you’ve pasted here are unsupported on Windows Phone 8.1, so if your code would ever indirectly call those, it would crash your application. RAIN.dll must be compiled against .NET Core for you to be able to use it.

Are you saying that this exact project builds fine for Windows Phone 8.1 on 5.1.4, but not 5.3.6? If so, that’s definitely a regression on our part… Can we have a bug report?

Sooooo… Where is the setting for this? The player settings have .net and il2cpp options only, clicking on the dll file within unity has three options - any, dot net and il 2 cpp. and yes il2cpp is only an option for Windows 10. How can I add this .NET Core?

No, I upgraded the project a couple of months ago and have definitely sunk some work and a couple more dlls. So yes it’s very much not the same project but many of the dll culprits were there before

.NET scripting backend is .NET Core. What Tomas said was that the DLL that’s giving you trouble was NOT compiled for .NET Core, and is using APIs that aren’t available. To fix that, you’d need to compile the DLLs, not change some setting in Unity.

Are you sure the exact same DLL worked for Windows Phone 8.1 on older Unity version? I mean, I’m pretty sure these APIs were never available on 8.1.

Gotchya, so from what it is posted it looks like these DLL’s just won’t work… bizarre… given the dll’s except one or two didn’t give me problems before…

Ultimately if these DLLs aren’t rewritten to support the correct APIs Windows Store Apps are simply not an option, correct?

Seeing as RAIN AI hasn’t been updated (and sadly never will be…) since May 2015 and it’s been an integral part of my project from the get go and I can fire up the older version of my app on my Lumia 820 right now I’d say there’s a pretty fair chance this dll didn’t give me any problems. Also, the P2T.dll from Exploder on the asset store is throwing similar errors and that was a part of my game as well. I still have a back up of 5.1.4 version that I can try and build with…

Edit: looks like there was a discussion about possibly rewriting RAIN for windows Universal back in July 2015… RIP UAS plans…

Ok, so I made a quick dummy project with RAIN in it and built it on Windows phone 8.1 platform on unity 5.1.4 and it built just fine. However if I try to build it on the Windows STORE platform using with the Windows phone 8.1 SDK it runs into the same problems. There is no Windows phone platform anymore in unity 5.3. Mystery solved. It’s been broke all along and I didn’t even know it… :confused:

Do you have the source code for the DLL? You could try replacing usages of those APIs.

Nope. It’s prolly beyond my rudimentary coding abilities even if I did.