Visual studio 2017 no longer opens in a13

When I double click a script or error it no longer opens Visual Studio 2017 in a13.

Happens in a fresh project & in upgraded ones, still works on a9.

There is no error when double clicking on files, nothing happens.

There is an error when right clicking and doing open C# project.

ArgumentException: The specified path is not of a legal form (empty).
System.IO.Path.InsecureGetFullPath (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.IO.Path.GetFullPathInternal (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.IO.FileInfo.Init (System.String fileName, System.Boolean checkHost) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.IO.FileInfo..ctor (System.String fileName) (at <23c160f925be47d7a4fd083a3a62c920>:0)
(wrapper remoting-invoke-with-check) System.IO.FileInfo..ctor(string)
VisualStudioEditor.VSEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.3/Editor/VSEditor.cs:373)
UnityEditor.CodeEditorProjectSync.OpenProjectFileUnlessInBatchMode () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:52)
UnityEditor.CodeEditorProjectSync.SyncAndOpenSolution () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:44)
1 Like

Same thing for me, imported project and I tried to create a new script, no reaction when I double click on a script. Preferences are set on Visual Studio 2017.

Did you file a bug report?

Error message:

1 Like

I tried again after deleting the .csproj and .sln files; after double clicking on a script, the files are recreated but VS doesn’t open.

In case this would be related to a certain bug with the Hub, I loaded another project made with 2019.1.0f2: VS starts when I double click on a script.

I did now, using editor report issue.
(I’m not getting a confirmation email, so I’m not sure it worked.)

ok, just took a while.
Ticket is open on FogBugz Case 1149180

There’s already an update to the com.unity.ide.visualstudio package (1.0.3 → 1.0.4), have you tried upgrading to that?

I’ve noticed these packages, why do we need additional VS packages now?

I did install the update: no changes.

I removed:

  • Rider editor,
  • VS Code editor,
  • VS Editor,

and deleted the .csproj and .sln files: no changes either except that the .csproj and .sln are not recreated when I double-click on a script.

I just noticed that, after deinstalling the packages and double-clicking on a script, VS studio runs in the task manager but doesn’t display on the screen.

I’m deinstalling 2019.2.0a13; there is no point in keeping it if I cannot use it.

Now that I have deinstalled 2019.2.0a13, I cannot install the previous version; Unity Hub v.2 beta doesn’t propose it.

I got a reply, the issue is fixed in next package which is not yet released.
They don’t know when that package will be available.
So reverting back to older version seems to be only option for now.

2 Likes

Thanks, I was freaking out, I have the same issue

I’ve just downloaded alpha14, hoping that this had been fixed, but it’s not.
Unity’s almost unusable without easily being able to edit scripts in a decent application.

Alpha for a reason, just downgrade.

Rider works fine though by the way.

I haven’t noticed this on my end. Right now I’m on Visual Studio Editor 1.0.6 package with a14, things works properly. Pretty sure VS worked for me on some earlier VS package on a13 as well.

Last alpha. Have this error:

Unable to find bridge dll in registry for Microsoft Visual Studio Tools for Unity for C:/Program Files/Unity2017/MonoDevelop/bin/MonoDevelop.exe
UnityEngine.Debug:Log(Object)
VisualStudioEditor.VSInitializer:InitializeVisualStudio(String, Dictionary`2) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.6/Editor/VSInitializer.cs:107)
VisualStudioEditor.VSInitializer:Initialize(String, Dictionary`2) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.6/Editor/VSInitializer.cs:23)
VisualStudioEditor.VSEditor:Initialize(String) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.6/Editor/VSEditor.cs:373)
Unity.CodeEditor.CodeEditor:SetExternalScriptEditor(String) (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditor.cs:154)
UnityEditor.PreferencesProvider:AppsListClick(Object, String[], Int32)

Using Mono Behavoir perfectly before that. Hate this.

1 Like

It didn’t for me either.

What’s that?

Same thing for me. The only way to open VS is:

  • right-clicking on the script in the project window,
  • selecting “Show in Explorer”,
  • once located in the explorer, open it.

Unfortunately, after opening the scripts using that method, intellisense doesnt work…

1 Like

This actually doesn’t work for me, trying to open a .cs file (double clicking it) doesn’t open, it’s set to open with Visual Studio, I’ve tried everything (run as administrator, right click open with) nothing works. Only opens with notepad

Still investigating:

  • created a brand new project in 2019.2.0a14,
  • created a script that I called Test,
  • double-clicked on the script in the editor: doing this creates the .csproj and .sln files in the main directory but it doesn’t create the hidden .vs folder,
  • right-clicked on the script in the editor and selected “Open C# Project”: doing this generates the following error message in the console.

Error message:

ArgumentException: The specified path is not of a legal form (empty).
System.IO.Path.InsecureGetFullPath (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.IO.Path.GetFullPathInternal (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.IO.FileInfo.Init (System.String fileName, System.Boolean checkHost) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.IO.FileInfo..ctor (System.String fileName) (at <23c160f925be47d7a4fd083a3a62c920>:0)
(wrapper remoting-invoke-with-check) System.IO.FileInfo..ctor(string)
VisualStudioEditor.VSEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at <702b024648ec477ebb75a2597cc68f30>:0)
UnityEditor.CodeEditorProjectSync.OpenProjectFileUnlessInBatchMode () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:52)
UnityEditor.CodeEditorProjectSync.SyncAndOpenSolution () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:44)

Nobody from the development team commented on this. @LeonhardP ?

1 Like

As a follow up, I installed Visual Studio 2019: same problem exactly…

No problem when I use Visual Studio 2019 with 2019.1.0f2.