.NET Core Issues
This section provides information on typical .NET Core related issues.
.NET Core SDK version#
To develop a project using C# Component System, a developer (artist, designer, and any other person working with the project) should have .NET Core SDK installed on their computer.
It is required to install the SDK, not the runtime, because SDK contains both the compiler, which compiles .cs-components in UnigineEditor, and the runtime, which runs an already compiled application from UnigineEditor at the development stage.
Do I Need to Install .NET Core on All PCs to Run the Final Build?#
Running a final application built by UnigineEditor via the Build Tool does not require .NET Core SDK or .NET Core runtime. The output applications are self-contained and can be run flawlessly on almost any computer.
Typical Errors#
If you don't have .NET Core SDK installed, you can come across various errors while working with the project in both SDK Browser and UnigineEditor. For example, when running the application (clicking the RUN button) after creating it in SDK Browser, you may receive the error stating that File Not Found — File *_x64.dll doesn't exist:
Errors also can occur when clicking the Play button in UnigineEditor (Required .NET Core SDK 3.1 not found):
Fixing Errors with Missing SDK#
To fix any possible errors with missing .NET Core 3.1.x SDK, you need to download and install .NET Core SDK 3.1.300 using the following link: https://dotnet.microsoft.com/download/dotnet-core/3.1.
Installing .NET Core 3.1.x SDK on Windows#
We recommend installing the version 3.1.300: https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer.
Download the required installer and run it following all installation steps.
Optional: After installing the SDK you might find it useful to disable .NET Core SDK telemetry.
Installing .NET Core 3.1.x SDK on Linux#
We recommend installing .NET Core SDK version 3.1.300: https://docs.microsoft.com/en-us/dotnet/core/install/linux.
Linux operating systems supported by .NET Core include at least the following:
- Red Hat Enterprise Linux 7, 8
- CentOS 7, 8
- Fedora 31, 32
- Debian 9, 10
- Ubuntu 16.04, 18.04, 19.10, 20.04
- openSUSE 15+
- SUSE Enterprise Linux (SLES) 12 SP2+, 15
- Alpine Linux 3.9+
.NET Core SDK can be installed on Linux in a number of ways. We describe manual installation, as it is more flexible (the process was described by Michael Heydt). Using the command line terminal, do the following:
- Download the installer:
For RedHat Enterprise Linux 6 users the following line should be used:
wget https://download.visualstudio.microsoft.com/download/pr/0c795076-b679-457e-8267-f9dd20a8ca28/02446ea777b6f5a5478cd3244d8ed65b/dotnet-sdk-3.1.300-linux-x64.tar.gz
wget https://download.visualstudio.microsoft.com/download/pr/cdb98822-bf8f-4f11-a5a4-baa8d8ad66d0/b696896552ca7768a7189f775e220d2e/dotnet-sdk-3.1.300-rhel.6-x64.tar.gz -O dotnet-sdk-3.1.300-linux-x64.tar.gz
- Create the directory and uncompress the file there:
mkdir ~/dotnet-3.1.300 && tar -xvf dotnet-sdk-3.1.300-linux-x64.tar.gz -C ~/dotnet-3.1.300
- Create a symlink to the executable file in that directory:
You can do without a symlink and root access — just edit the ~/.profile file (or its equivalents: ~/.bashrc, ~/.kshrc, ~/.zshrc) in any text editor by adding the following line:
sudo ln -s ~/dotnet-3.1.300/dotnet /usr/bin/dotnet
It will look this way:export PATH="$PATH;$HOME/dotnet-3.1.300"
- Optional: After the file has been unpacked successfully, you can delete the archive:
rm dotnet-sdk-3.1.300-linux-x64.tar.gz
- Optional: After installing the SDK, you might find it useful to disable .NET Core SDK telemetry.
Checking .NET Core SDK Version#
You can check which .NET Core SDK Version (or versions) is installed on your PC.
On Windows#
- Open the Command Prompt (Click the Start button and type cmd).
- In the window that opens, type the following:
dotnet --list-sdks
The following information should appear:
On Linux#
- Open the terminal.
- In the window that opens, type the following:
dotnet --list-sdks
The following information should appear:
In the output, all installed .NET Core SDK versions are listed. If you installed SDK 3.1.x and it is not listed, address Microsoft support.
Checking SDK Compatibility#
When loading a C# Component System based project, UnigineEditor lists all found .NET Core versions in its log:
.NET Core SDK is not found. | |
Unsuitable versions of .NET Core SDK are found. | |
.NET Core SDK 3.1.x is found and C# Component System is initialized successfully. |
Visual Studio Code Issues#
OmniSharp extension Error: spawn cmd ENOENT#
In case IntelliSense cannot be started due to the spawn cmd ENOENT error in the OmniSharp extension, it is recommended to add %WINDIR%\System32 to the PATH variable.
On Linux, you may require adding ~/.vscode/extensions to the path, for example in the .bashrc file:
export PATH=$HOME/.vscode/extensions:$PATH
For more details see https://github.com/OmniSharp/omnisharp-vscode/issues/32.