Search Unity

Unity 2017.3 Still No .NET Framework 4.6.1 Support?!

Discussion in 'Editor & General Support' started by raeldor, Jan 27, 2018.

  1. raeldor

    raeldor

    Joined:
    Jul 8, 2013
    Posts:
    55
    Trying to debug my application in VS2017 and keep getting...

    Severity Code Description Project File Line Suppression State
    Warning The primary reference "TensorFlowSharp" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.6". Robotics

    Does this mean there's no support for 4.6.1?! How am I supposed to debug my application? Also, I assume Unity isn't using VS2017 for compilation since this seems to run ok inside the editor. My VS2017 is up to date 15.5.5.
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    You debug your application by attaching to the unity editor, not by choosing debug/start debugging.

    Go into the unity editor, open your project, choose Assets/Open C# project.

    Then, after VS opens, choose "Attach to Unity". Then you can debug, set breakpoints, etc.
     
  3. raeldor

    raeldor

    Joined:
    Jul 8, 2013
    Posts:
    55
    Appreciate the reply, but when I click 'Attach to Unity' it tries to compile and fails because of the above error and then asks if I want to use the last version.
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Have you tried just rebuilding the offending assembly to target .Net 4.6?
     
  5. raeldor

    raeldor

    Joined:
    Jul 8, 2013
    Posts:
    55
    I thought I might be a little out of my depth there, but I downloaded the source from Git and managed to rebuild with 4.6 which seems to have fixed the issue! Appreciate the help, thank you. Little surprised that Unity isn't compatible with 4.6.1 though. Especially since the ML-Agents are using TensorFlowSharp which is compiled against 4.6.1.
     
    ibyte likes this.
  6. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    I have the same issue with ml-agents .03
     
  7. gwhitcher_unity

    gwhitcher_unity

    Joined:
    Jan 15, 2018
    Posts:
    45
    I moved development to a different PC. I get a message that tells me the application is unavailable. it is pointing to .NET 4.6. Seems the OS already has 4.6.1 installed and doesn't show up in control panel so I can't roll it back to 4.6. Does this mean I can't develop on the new PC?