Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Windows Finishes build then throws 250+ errors

Discussion in 'Windows' started by christougher, Sep 7, 2016.

  1. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    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:
    Code (CSharp):
    1. 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.
    2. 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).
    3. 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).
    4. 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).
    5. 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).
    6. 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).
    7. 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).
    8. 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).
    9. 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().
    10. 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().
    11. 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().
    12. 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().
    13. 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().
    14. 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().
    15. 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().
    16. 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().
    17. 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().
    18. 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().
    19. 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().
    20. 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().
    21. 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().
    22. Error: type `System.Threading.Thread` doesn't exist in target framework. It is referenced from RAIN.dll at RAIN.Navigation.NavMesh.RecastProcess.ContourCreator.
    23. 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().
    24. 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().
    25. 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).
    26. 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).
    27. 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).
    28. 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).
    29. 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).
    30. 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).
    31. 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).
    32. 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).
    33. 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).
    34. 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).
    35. 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).
    36. 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).
    37. 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).
    38. 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>&).
    39. 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>&).
    40. 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().
    41. 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

    Code (CSharp):
    1. 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).
    2. UnityEngine.Debug:LogError(Object)
    3. PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:591)
    4. PostProcessUniversal81:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:123)
    5. PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:126)
    6. PostProcessUniversal81:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:42)
    7. 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...
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,647
    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.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    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?
     
  4. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    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
     
    Last edited: Sep 7, 2016
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    .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.
     
  6. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    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...
     
    Last edited: Sep 8, 2016
  7. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    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... :/
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,478
    Do you have the source code for the DLL? You could try replacing usages of those APIs.
     
  9. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Nope. It's prolly beyond my rudimentary coding abilities even if I did.