Code editor integration for VSCode. (2021.3+)
See Changelog.
If you find my package useful, please consider giving it a Star ๐ to show your support. Thank you!
This package offers comprehensive project SDK support based on .Net 7 and .Net 6 standards. By leveraging this support, you can utilize the latest C# features and language enhancements within your Unity projects, subject to Unity's compatibility.
To enhance project structure and maintain cleanliness, the com.tsk.ide.vscode
package facilitates the automatic separation of .csproj
files into individual folders. These folders are consolidated within a main directory named "CSProjFolders." This organization ensures a more streamlined and organized project structure, contributing to improved clarity and ease of navigation.
The com.tsk.ide.vscode
package ensures a seamless build process by guaranteeing successful execution of the dotnet build
command. This means that your project can be compiled and built without any issues, ensuring a smooth development experience.
In addition to its core features, this package includes seamless integration with the Microsoft.Unity.Analyzers library. This integration provides you with access to a wide range of code analysis and validation tools specifically designed for Unity projects. With the support of these analyzers, you can enhance code quality, identify potential issues, and adhere to best practices, ultimately improving the overall robustness and maintainability of your Unity projects.
The com.tsk.ide.vscode
package provides a professional solution for effortlessly setting up Visual Studio Code to seamlessly integrate with Unity. It automates the generation of essential configuration files, namely omnisharp.json and .editorconfig, sparing you valuable time and effort that would otherwise be spent on manual setup.
By eliminating the need to disable the use of ModernNet, you can effortlessly access the complete range of modern .NET features within your Unity projects. This seamless integration unlocks a multitude of benefits, including enhanced performance and improved stability, empowering you to optimize your projects like never before.
Furthermore, the package introduces a dedicated configuration section within External Tools. This empowers users to exercise complete control over the settings files generated by the package, allowing for manual customization to accommodate individual preferences and project-specific requirements. With this added flexibility, you can fine-tune your development environment to achieve optimal results.
- Install both the .Net 7 and .Net 6 SDKs - https://dotnet.microsoft.com/en-us/download
- Crossroad choice between Omnisharp (Unsupported) or C# Devkit (Preview but supported by Microsoft)
- Omnisharp: Install the C# extension from the VS Code Marketplace.
- C# Devkit: Install the C# Dev Kit extension from the VS Code Marketplace.
- Logout or restart Windows to allow changes to
%PATH%
to take effect. - The C# extension no longer ships with Microsoft Build Tools, so they must be installed manually.
- Download the Build Tools for Visual Studio 2022.
- Install the .NET desktop build tools workload. No other components are required.
- To avoid seeing "Some projects have trouble loading. Please review the output for more details", make sure to install the latest stable Mono release.
- If you aren't using C# Devkit, do the following:
- In your Visual Studio Code (VS Code) user settings, ensure that the configuration
"omnisharp.useModernNet":
is set tofalse
. This configuration must be in place to prevent VS Code from utilizing the Mono version included in the official C# extension (specifically, version 6.0.X as of the latest release). - Upon installing the latest version of Mono directly, set the following configuration value:
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current"
- Ensure you replace the provided path with the location where you installed Mono. By doing so, VS Code will strictly utilize the newly installed version of Mono for all operations.
- In your Visual Studio Code (VS Code) user settings, ensure that the configuration
- Open Window/Package Manager
- Click +
- Select Add package from git URL
- Paste
https://github.com/Chizaruu/com.tsk.ide.vscode.git#upm
into URL - Click Add
Please follow the instrustions:
- Open Edit/Project Settings/Package Manager
- Add a new Scoped Registry (or edit the existing OpenUPM entry)
Name: package.openupm.com
URL: https://package.openupm.com
Scope(s): com.tsk.ide.vscode
- Click Save (or Apply)
- Open Window/Package Manager
- Click +
- Select Add package by name... or Add package from git URL...
- Paste com.tsk.ide.vscode into name
- Paste 1.4.2 into version
- Click Add
Alternatively, merge the snippet to Packages/manifest.json
{
"scopedRegistries": [
{
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": ["com.tsk.ide.vscode"]
}
],
"dependencies": {
"com.tsk.ide.vscode": "1.4.2"
}
}
After installing the package, follow these steps to regenerate the .csproj files:
- Open the Preferences window.
- Go to the External Tools tab.
- Click on the Regenerate .csproj Files option.
Please note that any previously existing configuration files will be overwritten during the package installation.
- To enable grammar and highlighting for jslib files, install the jslib-for-unity package.
Thank you for considering contributing to the com.tsk.ide.vscode
package! To contribute, please follow these guidelines:
- Create a new branch for your changes.
- Discuss your changes by creating a new issue in the repository before starting work.
- Follow the existing coding conventions and style.
- Provide a clear description of your changes in your pull request.
- Submit your pull request to the default branch.
We appreciate all contributions to com.tsk.ide.vscode!