Search Unity

Error MSB3073 when using a higher minimum version than 10.0.10240

Discussion in 'Windows' started by paulb39, Mar 21, 2020.

  1. paulb39

    paulb39

    Joined:
    Oct 27, 2013
    Posts:
    17
    I am using Unity 2018 and VS2017.

    I compiled my project for UWP, with a .net back end. It works fine.

    I added a NavigationView to a page, the project forces you to update the minimum version to use it, needs to be 10.0.1809. When I do that, the project won't compile anymore.

    It fails with error MSB3073 on the assembly converter:

    Code (CSharp):
    1. 1>  Running AssemblyConverter...
    2. 1>  Failed to fix references for method System.Boolean UnityEngine.Experimental.UIElements.UxmlTraits/<GetAllAttributeDescriptionForType>d__10::MoveNext()
    3. 1>  Failed to fix references for type UnityEngine.Experimental.UIElements.UxmlTraits/<GetAllAttributeDescriptionForType>d__10
    4. 1>  System.Exception: Failed to resolve System.Reflection.BindingFlags
    5. 1>     at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
    6. 1>     at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)
    7. 1>     at Unity.FixReferencesStep.Visit(MethodDefinition method, GenericContext context)
    8. 1>     at Unity.FixReferencesStep.Visit(TypeDefinition type)
    9. 1>     at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
    10. 1>     at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
    11. 1>     at Unity.TypeDefinitionDispatcher..ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
    12. 1>     at Unity.FixReferencesStep.ProcessModule()
    13. 1>     at Unity.ModuleStep.Execute()
    14. 1>     at Unity.FixReferencesStep.Execute()
    15. 1>     at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
    16. 1>     at Unity.Operation.Execute()
    17. 1>     at Unity.Program.Main(String[] args)
    18. 1>C:\projects\Unity\UnityChessGame\UWP\UnityChessGame\UnityChessGame.csproj(462,5): error MSB3073: The command ""C:\projects\Unity\UnityChessGame\UWP\Unity\Tools\AssemblyConverter.exe" -platform=uap -bits=64 -configuration=Debug -removeDebuggableAttribute=False -uwpsdk=10.0.17763.0 -path="." -path="C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\dotnet\x64\Debug" -workingDir="C:\projects\Unity\UnityChessGame\UWP\UnityChessGame\\" "@C:\projects\Unity\UnityChessGame\UWP\UnityChessGame\AssemblyConverterArgs.txt"" exited with code 1.
    I can find no information about this error, any help would be greatly appreciated.
     
  2. paulb39

    paulb39

    Joined:
    Oct 27, 2013
    Posts:
    17
    Well I can get it to compile for Creators Update (15063) if I update the nuget package for Microsoft.NETCore.UniversalWindowsPlatform to 6.210. Any version above that and it blows up with a different error now:


    Code (CSharp):
    1. 1>  Running AssemblyConverter...
    2. 1>  System.InvalidOperationException: Sequence contains more than one matching element
    3. 1>     at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
    4. 1>     at Unity.ModuleContext.GetCorLibMethod(TypeReference type, Func`2 predicate)
    5. 1>     at Unity.ModuleContext.GetCorLibMethod(String typeFullName, String methodName)
    6. 1>     at Unity.AddMethodUtilityClassStep.WSA_AddInvokeDefaultConstructorMethod(TypeDefinition type)
    7. 1>     at Unity.AddMethodUtilityClassStep.ProcessModule()
    8. 1>     at Unity.ModuleStep.Execute()
    9. 1>     at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
    10. 1>     at Unity.Operation.Execute()
    11. 1>     at Unity.Program.Main(String[] args)
    12. 1>C:\projects\Unity\UnityChessGame\UWP\UnityChessGame\UnityChessGame.csproj(467,5): error MSB3073: The command ""C:\projects\Unity\UnityChessGame\UWP\Unity\Tools\AssemblyConverter.exe" -platform=uap -bits=64 -configuration=Debug -removeDebuggableAttribute=False -uwpsdk=10.0.17763.0 -path="." -path="C:\Program Files\Unity\Hub\Editor\2018.4.17f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\dotnet\x64\Debug" -workingDir="C:\projects\Unity\UnityChessGame\UWP\UnityChessGame\\" "@C:\projects\Unity\UnityChessGame\UWP\UnityChessGame\AssemblyConverterArgs.txt"" exited with code 1.
     
  3. paulb39

    paulb39

    Joined:
    Oct 27, 2013
    Posts:
    17
    I can't install Mysql.Data since it requires NetStandard, which requires the Fall Creators Update. I can't reference a PCL or Net Standard library either unless I can figure out how to update the min version.
     
  4. paulb39

    paulb39

    Joined:
    Oct 27, 2013
    Posts:
    17
    Using a really old version of the SQL library so I can call my DB via Mysql.Data.RT.

    Got around the NavigationView version requirement by using it directly: Windows10FallCreatorsUpdate:NavigationView

    I can't use a lot of libraries because I can't up my Windows Minimum Version any higher, is there really no one on this forum who is using UWP with Unity?
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Usually traffic on this forum is way lower on weekends.

    Anyway, you're facing this issue: https://forum.unity.com/threads/err...ith-min-platform-version-10-0-16299-0.685918/

    Updating Microsoft.NETCore.UniversalWindowsPlatform to 6.x version is not supported. We only support versions 5.x.
     
  6. paulb39

    paulb39

    Joined:
    Oct 27, 2013
    Posts:
    17
    Thank you so much, that worked! I lowered Microsoft.NETCore.UniversalWindowsPlatform back to 5.4.4 and followed instructions in that thread to edit the .csproj file. Only other thing I had to do was run "Install-Package System.Reflection.TypeExtensions -Version 4.0.0"

    Can this info please be added to the documentation for UWP? I know C# support is deprecated but it is still in Unity LTS. And everyone has to update the minimum version to be able to push a project to the store.

    My google skills are usually better than that, I don't know how I missed that thread.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I was hoping it would be fixed in Visual Studio by this time, that's why I didn't bother adding it to documentation :(.