# Troubleshooting C# IntelliSense in VS Code

A historical Unity tooling setup that resolved an OmniSharp ILoggerFactory error by pinning compatible versions.

> C# IntelliSense in VS Code kept stopping unexpectedly. In December 2022, I ran into another failure:

```
System.Composition.Hosting.CompositionFailedException: No export was found for the contract 'ILoggerFactory'
```

OmniSharp had updated automatically. In `settings.json`, I changed `omnisharp.path` from `latest` to a pinned version:

```
"omnisharp.path": "1.39.2",
```

## Versions that worked together in this setup

Automatic extension updates were a recurring source of problems in this project. This is the historical combination I found stable:

- .NET Framework **4.7.1**.
- Unity's VS Code package **1.2.0**: set `"com.unity.ide.vscode": "1.2.0"` in `manifest.json`.
- VS Code's C# extension **1.24.0**: use the arrow beside the uninstall button and choose **Install Another Version**.
- OmniSharp **1.39.2**: pin it with `omnisharp.path` in `settings.json`.

## Default .NET Framework reference-assembly path

`C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1`