Table of Contents

UnityCsProjectConverter

Unity Editor extension to override <Project> header in .csproj generated by Unity without effort. To import extension as a UPM package, add the following git url in Unity Package Manager.

https://github.com/sator-imaging/Csproj.Sdk.git?path=Unity

?path=Unity suffix is required

Configuration options are available in Unity Editor > File > C# Project menu.

Scripting API: https://sator-imaging.github.io/Csproj.Sdk/api/SatorImaging.Csproj.Sdk.html

Csproj.Sdk.Void

Editor extension will add latest version of Csproj.Sdk.Void SDK package by default. When you need to specify certain version or other SDK package, see the following section.

Use Custom SDK

You can use your own sdk by setting like as follows.

UnityCsProjectConverter.CustomSdkNameWithVersion = "MyApp.Sdk/1.0.0";

Note that you need to disable "Use Void SDK" option in File > C# Project menu or by C# script.

UnityCsProjectConverter.Prefs.Instance.UseVoidSdk = false;
Tip

Use builtin "Void" SDK and customize with the following override files for .csproj allows flexible and efficient property management.

.csproj Overrides

To customize property, you can use the following overrides to .csproj.

  • Unity project or ascendant folder
    • Directory.Build.props (by msbuild)
    • Directory.Build.targets (by msbuild)
Note

.props overrides loaded in earlier stage of parsing .csproj file and then .targets overrides loaded around end of parse.

Visual Studio Code + Unity

It seems that recent update to Visual Studio Editor package (not Visual Studio Code Editor, take care) will allow VS Code to being used for Unity development.

I am not sure on VS Code dev environment for Unity but I heard official support by Unity had been discontinued. As of described above, try using Visual Studio package for VS Code development.