Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio Package unregisters TSK Package #77

Closed
Chizaruu opened this issue Aug 3, 2023 · 3 comments
Closed

Visual Studio Package unregisters TSK Package #77

Chizaruu opened this issue Aug 3, 2023 · 3 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@Chizaruu
Copy link
Owner

Chizaruu commented Aug 3, 2023

Current Behavior

The recent version of the Visual Studio Package unregisters the TSK package from being a choice in External Tools.

Reproduction / Steps To Reproduce

  1. Install Visual Studio Package
  2. Find that the TSK package option is unregistered from External tools

Anything else?

That is an excellent way of saying hello, Microsoft.

Note: the Visual Studio Code Editor package is a legacy package that is not maintained anymore. The Visual Studio Editor package now handles the entire family of Visual Studio products.

@Chizaruu Chizaruu added the bug Something isn't working label Aug 3, 2023
@Chizaruu Chizaruu changed the title Installing Visual Studio Package purposely overlaps TSK Package Visual Studio Package purposely overlaps TSK Package Aug 3, 2023
@Chizaruu Chizaruu pinned this issue Aug 4, 2023
@Chizaruu
Copy link
Owner Author

Chizaruu commented Aug 4, 2023

Found the issue in VisualStudioEditor.cs in the Visual Studio Package

#if UNITY_2019_4_OR_NEWER && !UNITY_2020
		[InitializeOnLoadMethod]
		static void LegacyVisualStudioCodePackageDisabler()
		{
			// disable legacy Visual Studio Code packages
			var editor = CodeEditor.Editor.GetCodeEditorForPath("code.cmd");
			if (editor == null)
				return;

			if (editor is VisualStudioEditor)
				return;

			CodeEditor.Unregister(editor);
		}
#endif

I will patch it later tonight or this weekend.

@Chizaruu Chizaruu changed the title Visual Studio Package purposely overlaps TSK Package Visual Studio Package purposely unregisters TSK Package Aug 4, 2023
@Chizaruu Chizaruu added the wontfix This will not be worked on label Aug 4, 2023
@Chizaruu
Copy link
Owner Author

Chizaruu commented Aug 4, 2023

K, pretty easy solution, uninstall the Visual Studio package.

Saltiness aside, I welcome someone else to patch this issue or convince the Microsoft/Unity team to remove these lines of code.

For now, I'll update the README.md for new users coming across this package. ✌️

@Chizaruu
Copy link
Owner Author

Chizaruu commented Aug 6, 2023

microsoft/vscode-dotnettools#323 (comment)

Hi @Chizaruu, we updated our package to only disable the legacy com.unity.ide.vscore package.

Regarding "Both packages can be used at the same time", yes you are right for the discovery and when you explicitly select an installation during the session.

Just waiting on the next package update release before I can close this issue.

@Chizaruu Chizaruu changed the title Visual Studio Package purposely unregisters TSK Package Visual Studio Package unregisters TSK Package Aug 6, 2023
@Chizaruu Chizaruu unpinned this issue Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant