0

This is an issue I've been having almost identical to this post from 2015 where some of the fix issues (such as downloading Tools for Unity 2015 when there is no modern counterpart I can find on the marketplace) seem outdated.

My situation is also unique in that I am attempting to edit scripts from an imported unity project, as I'm now on a new PC and needed to continue my Udemy coursework on a new install of Unity. I downloaded the project directly from the Udemy course's resources, which was admittedly on a much older version of Unity I didn't feel comfortable using, so I upgraded it to a newer version (2020.3.13f1).

I'm not sure whether this is an issue with the upgrade, importing projects, or what really. I should also mention that my version of Visual Studio was downloaded from within the Unity Hub along with the install of the Unity Engine itself, so I'm not really understanding why it wouldn't see even newly created scripts as tied to Unity.

Error message within Unity when attempting to open a script:

Win32Exception: ApplicationName='C:\Users\amoll\OneDrive\Desktop\Unity Projects\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\Library\PackageCache\com.unity.ide.visualstudio@2.0.11\Editor\COMIntegration\Release\COMIntegration.exe', CommandLine='"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe" "C:\Users\amoll\OneDrive\Desktop\Unity Projects\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8.sln" "" -1', CurrentDirectory='', Native error= The system cannot find the file specified.

System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at :0) System.Diagnostics.Process.Start () (at :0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor.OpenWindowsApp (System.String path, System.Int32 line) (at Library/PackageCache/com.unity.ide.visualstudio@2.0.11/Editor/VisualStudioEditor.cs:323) Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at Library/PackageCache/com.unity.ide.visualstudio@2.0.11/Editor/VisualStudioEditor.cs:224) UnityEditor.CodeEditorProjectSync.OpenProjectFileUnlessInBatchMode () (at <01e901910c5242498b7e69f6d2d8d500>:0) UnityEditor.CodeEditorProjectSync.SyncAndOpenSolution () (at <01e901910c5242498b7e69f6d2d8d500>:0)

  • Ensure that when you installed Visual Studio that you selected the option for Unity –  Aug 09 '21 at 01:09

1 Answers1

1

First thing you should do is in unity to make sure that in Preferences and External Editors that Visual Studio 2019 is selected. If is already, then also try and right click anywhere in the project and click Open C# project. I had this problem and for some reason right clicking and selecting open C# project worked for me. Also try right clicking in visual studio and rebuilding the solution.

  • For whatever reason, after putting Visual Studio as my external editor preference, I can now not open files with "Open C# Project" Whenever I click that option nothing actually happens. Also, I'm not sure how to do that last piece of advice in visual studio if you could explain? I don't see that option anywhere after right clicking. – onetruesleuther Aug 08 '21 at 19:42
  • Make sure in the Visual Studio installer that you have downloaded "Game development with Unity". From what I have seen it looks like Visual Studio is the issue. Not unity – QuicksterGames Aug 08 '21 at 21:16
  • > right click anywhere in the project and click Open C# project This worked for me. It's strange to see such lame tooling issues in commercial software in 2021. Spent two hours to solve it (I'm not so familiar to Unity, but such stupid issues seem impossible for Android or iOS dev tools). – artem Nov 12 '21 at 18:24