Search Unity

UWP error msb3073

Discussion in 'Windows' started by Timiibo, Feb 16, 2019.

  1. Timiibo

    Timiibo

    Joined:
    Feb 23, 2016
    Posts:
    6
    I am trying to build a UWP following along with the "Intro to porting Unity games to UWP: Building and deploying" When attempting to build the solution in Visual Studios I am getting the error -

    Error The command ""D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Unity\Tools\AssemblyConverter.exe" -platform=uap -lock="D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\project.lock.json" -bits=64 -configuration=Debug -removeDebuggableAttribute=False -uwpsdk=10.0.17763.0 -path="." -path="C:\Program Files\Unity5.3\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\dotnet\x64\Debug" "D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\Assembly-CSharp.dll" "D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\UnityEngine.dll" "D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\UnityEngine.Analytics.dll" "D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\nunit.framework.dll" "D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\UnityEngine.UI.dll" "D:\SamuraiPandaFiles\SakuraInGameLand\SakuraWindowsBuild\Sakura_in_GameLand\UnityEngine.Networking.dll"" exited with code 1.

    What am I doing wrong/what have I not done?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,420
    Can you paste the contents of the output window? Did you get any errors in the console when you built your project from Unity? Did you try using IL2CPP scripting backend?
     
  3. Timiibo

    Timiibo

    Joined:
    Feb 23, 2016
    Posts:
    6
    I have attached a txt doc of the output build, I didn't get any errors when building the project in Unity and I have just tried using IL2CPP scripting backend which was error free.
     

    Attached Files:

  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,420
    Are any of your plugins marked as "Don't process" in the plugin importer?

    Did you try using IL2CPP scripting backend?
     
  5. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    524
    Hi,

    I have the same error using Unity 5.6.3f1 and not targeting IL2CPP. I check all the plugin listed (in my case) and no one has the "Don't process" checkbox selected.

    Any idea what can cause that issue ?

    Thanks
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,420
    And there are no errors in the console when you build your game for UWP? Unfortunately 5.6.3f1 is ancient at this point, and even if it was a bug in Unity, we would not fix it. Could you by any chance upgrade to 2017.4 (as it's still supported for another year) and see if the issue reproduces there?

    Another workaround if you cannot upgrade Unity version is to switch to IL2CPP scripting backend.
     
  7. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    524
    Upgrading to 2017 causes other plugln compatibility issues for which I need authors help. So it's not a solution for now.

    Switching to IL2CPP makes the build failed with error like this one:

    Code (CSharp):
    1. UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\Data\Managed\Microsoft.Data.Sqlite.dll" --additionalreferences="Temp\StagingArea\Data\Managed","Temp\StagingArea\Data\Managed\Plugins\X64","Temp\StagingArea\Data\Managed\Plugins\X86","Temp\StagingArea\Data\Managed\Plugins\ARM" --platform="C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0\Facade\Windows.winmd" --dbg=pdb --framework="Temp\StagingArea\Data\Managed" --alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.Specialized,System;System.ComponentModel,System;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Globalization,mscorlib;System.IO,mscorlib;System.IO.Compression,System;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.Expressions,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.ServiceModel.Web;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Principal,mscorlib;System.ServiceModel,System.ServiceModel;System.ServiceModel.Channels,System.ServiceModel;System.ServiceModel.Description,System.ServiceModel;System.ServiceModel.Dispatcher,System.ServiceModel;System.ServiceModel.Security,System.ServiceModel;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml --ignore=System.IConvertible,mscorlib.
    2. Error: type `System.Lazy`1` doesn't exist in target framework. It is referenced from Microsoft.Data.Sqlite.dll at Microsoft.Data.Sqlite.SqliteCommand.
    3. Error: type `System.Lazy`1` doesn't exist in target framework. It is referenced from Microsoft.Data.Sqlite.dll at System.Void Microsoft.Data.Sqlite.SqliteCommand::.ctor().
    4. Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    5.    � Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
    6.    � Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name)
    7.    � Mono.Cecil.MetadataResolver.Resolve(TypeReference type) dans C:\buildslave\cecil\build\Mono.Cecil\MetadataResolver.cs:ligne 106
    8.    � Mono.Cecil.MetadataResolver.Resolve(MethodReference method) dans C:\buildslave\cecil\build\Mono.Cecil\MetadataResolver.cs:ligne 216
    9.    � Mono.Cecil.MethodReference.Resolve() dans C:\buildslave\cecil\build\Mono.Cecil\MethodReference.cs:ligne 170
    10.    � Unity.ReferenceRewriter.RewriteTypeReferences.Visit(MethodReference method, String referencingEntityName)
    11.    � Unity.ReferenceRewriter.ReferenceDispatcher.Visit(MethodReference method, String referencingEntityName)
    12.    � Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethodBody(MethodBody body)
    13.    � Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethod(MethodDefinition method)
    14.    � Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethods(TypeDefinition type)
    15.    � Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch()
    16.    � Unity.ReferenceRewriter.RewriteTypeReferences.Run()
    17.    � Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context)
    18.    � Unity.ReferenceRewriter.Program.Main(String[] args)
    19.  
    20. PostProcessWinRT.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:615)
    21. PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:170)
    22. UnityEditor.WSA.BuildPostprocessor.DoPostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:155)
    23. UnityEditor.WSA.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:162)
    24. UnityEditor.HostView:OnGUI()
    25.  
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,420
    When you switch to IL2CPP, can you try setting API compatibility level to 4.x? That error suggests you may be targeting 2.0.
     
  9. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    524
    Hello,

    Setting compatibility level to 4.x returns a lot of errors including one that seems to be specific to it:

    il2cpp_error.PNG

    I'm really stuckhere and have no idea how to get this build working.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,420
    Okay, looks like your plugins are using features that aren't part of IL2CPP in Unity 5.6 (they got added later).

    Let's get back to trying to get .NET working. What seems to be happening is that one of your plugins are causing AssemblyConverter tool to crash. Why - I don't know. However, there's a way to find out pretty easily.

    Copy all your scripts and DLL files into a separate Unity project, so building it is faster. You don't need to have anything in your scene to reproduce this. Then, build for UWP to make sure that you're still seeing this AssemblyConverter issue. Then, remove DLL files from that project 1 by 1 until you find a culprit. Make sure to build into an empty folder every time as adding/removing DLLs and building on top will not properly overwrite the project file.

    Once you find the culprit DLL, we can look at our options on how to make it work.