Search Unity

errors building packages, ex: com.unity.test-framework

Discussion in 'Package Manager' started by goldmark, Oct 6, 2019.

  1. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    every now and then I get VS2017 complaining about these packages.. sometimes its one, sometimes all of them:

    com.unity.test-framework
    com.unity.postprocessing
    com.unity.multiplayer-hlapi
    com.unity.textmeshpro
    com.unity.analytics
    com.unity.xr.legacyinputhelpers

    1>CSC : error CS2001: Source file '<project folder>\Packages\com.unity.test-framework\UnityEngine.TestRunner\AssemblyInfo.cs' could not be found.
    1>CSC : error CS2001: Source file '<project folder>\Packages\com.unity.test-framework\UnityEngine.TestRunner\Assertions\AllocatingGCMemoryConstraint.cs' could not be found.

    It seems the VS project files that get generated mistakenly think the source to these packages is inside my project folder, which they are not. Unity doesn't show the errors, only VS.

    Usually by removing and re-installing the packages the problem goes away. but its enoying to have to do this over and over. Not sure what happens when the issue starts. happens every few days for me it seems. I use perforce for source control, and switch streams between different platforms now and then, could this somehow cause it?

    Thanks
     
  2. SalwaC

    SalwaC

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    10
  3. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    2019.2.4f1
     
  4. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    editor log. note that includes a lot of DllNotFoundException errors, but that's because i am working on the PC with some platform dependent code. I got those sorted in the latest. Also note that the compile errors only happen in visual studio, and do not happen in editor.
     

    Attached Files:

  5. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    output from vs with all the package errors
     

    Attached Files:

  6. SalwaC

    SalwaC

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    10
    Thank you for the information.

    I would also need the version of VS and VSTU (Visual Studio Tools for Unity, a VS extension) that you're using.

    These errors only happen in VS, which is because Unity uses its own internal compilation pipeline that is not based on .sln/.csproj files. Those are files generated specifically for Visual Studio, so when VS compiles, it may result in something different from Unity (as is the case right now).
     
  7. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    Microsoft Visual Studio Community 2017
    Version 15.9.3
    VisualStudio.15.Release/15.9.3+28307.145
    Microsoft .NET Framework
    Version 4.7.02556
    Installed Version: Community
    Visual C++ 2017 00369-60000-00001-AA758
    Microsoft Visual C++ 2017
    C# Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
    C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
    GnD Editor Extension 1.5.2.0
    GnD Editor Extension
    Copyright (c) 2018 Sony Interactive Entertainment Inc. All rights reserved.
    JavaScript Language Service 2.0
    JavaScript Language Service
    Microsoft JVM Debugger 1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
    Microsoft MI-Based Debugger 1.0
    Provides support for connecting Visual Studio to MI compatible debuggers
    Microsoft Visual C++ Wizards 1.0
    Microsoft Visual C++ Wizards
    Microsoft Visual Studio VC Package 1.0
    Microsoft Visual Studio VC Package
    NintendoSDK Visual Studio Extension 1.0
    NintendoSDK Visual Studio Extension
    NuGet Package Manager 4.6.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    Oasis for NX 9.3.4.28431
    NX Visual Studio Integration
    PlayStation® Debugger 1.1.24.0
    Adds debugging support for PlayStation® platforms to Visual Studio.
    PlayStation® Visual Studio Integration 3.0.2.1
    PlayStation® Visual Studio Integration
    Copyright © 2019 Sony Interactive Entertainment Inc. All rights reserved.
    PlayStation®4 Debugger 6.50.0.15
    Adds debugging support for PlayStation®4 to Visual Studio.
    ProjectServicesPackage Extension 1.0
    ProjectServicesPackage Visual Studio Extension Detailed Info
    RazorCPU Extension 1.0
    RazorCPU Visual Studio Extension Detailed Info
    Visual Basic Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
    Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
    Visual Studio Code Debug Adapter Host Package 1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
    Visual Studio Tools for Unity 3.9.0.3
    Visual Studio Tools for Unity
     
  8. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    i attached the generated project file for one of the packages that's failing. Thing is, i am not sure why Unity singled out these packages and created project files for them and added them to the solution, and not others?

    it seems that instead of going to the cache folder or where ever it downloads the packages to, it wants to go to my game's package folder. example when looking for ChannelBuffer, it looks for it here:
    H:\w\main\project\tin\TrackMayhem\Packages\com.unity.multiplayer-hlapi\Runtime\ChannelBuffer.cs
    instead of where it is:
    H:\w\main\project\tin\TrackMayhem\Library\PackageCache\com.unity.multiplayer-hlapi@1.0.4\Runtime\ChannelBuffer.cs
     

    Attached Files:

  9. SalwaC

    SalwaC

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    10
    Hi,

    So what might be happening is the fact that you use VS 2017 with Unity 2019. Using a brand new Unity 2019 with an old VS IDE that is no longer supported (apart from security fixes) will cause issues.

    Unity's fixes and new features are only coming to VS 2019.

    I suggest you to migrate to VS2019. It comes with a free Community Edition and if you are working for a big company, Unity has a bundle Unity Pro + Visual Studio Pro.

    Hope this helps!

    Thank you,
    Salwa
     
  10. goldmark

    goldmark

    Joined:
    Jul 23, 2019
    Posts:
    17
    I have vs 2015 pro but nothing newer. i should be getting the newer version soon. thanks for the help. i will try vs2019 community in the meantime.