Omnisharp won't update project?

I launched my project today, opened one of my scripts via Visual Studio and I get the following error message:

Attempted to update project that is not loaded: c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\Assembly-CSharp.csproj```

This has never happened before, and I don't understand why it is happening now. Intellisense is not working at all.. Is this an issue on Microsoft's end with Visual Studio? I also have the following warning message:

```WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].```

Could that have something to do with it? Full Omnisharp log below:

~~~csharp
Starting OmniSharp server at 2021-03-04, 9:56:31 a.m.
    Target: c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\2D Platformer Project.sln

OmniSharp server started.
    Path: c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\OmniSharp.exe
    PID: 29152

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 16.9.0 - "c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to 'c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\.msbuild\Current\Bin\MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 16.9.0 - "c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\.msbuild\Current\Bin"
            CscToolExe = csc.exe
            CscToolPath = c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\.msbuild\Current\Bin\Roslyn
            MSBuildExtensionsPath = c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\.msbuild
            MSBuildToolsPath = c:\Users\karta\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.7\.msbuild\Current\Bin
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Users\karta\Desktop\Unity Projects\2D Platformer Project'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in 'c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\2D Platformer Project.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Users\karta\Desktop\Unity Projects\2D Platformer Project'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Users\karta\Desktop\Unity Projects\2D Platformer Project' on host 36852.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\Assembly-CSharp.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\Assembly-CSharp.csproj'.
c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\Assembly-CSharp.csproj(0,0)
System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading.Tasks.Dataflow, Version=4.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Threading.Tasks.Dataflow, Version=4.6.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Microsoft.Build.BackEnd.Logging.LoggingService.ProcessLoggingEvent(Object buildEvent, Boolean allowThrottling)
   at Microsoft.Build.BackEnd.Logging.LoggingService.LogProjectEvaluationStarted(BuildEventContext projectEvaluationEventContext, String projectFile)
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath, IReadOnlyDictionary`2 projectConfigurationsInSolution) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:line 157
   at OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath, IReadOnlyDictionary`2 configurationsInSolution) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:line 75
   at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader, Guid sessionId, DotNetInfo dotNetInfo) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs:line 116
   at OmniSharp.MSBuild.ProjectManager.<>c__DisplayClass31_0.<LoadProject>b__0() in D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs:line 304
   at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func`1 loader) in D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs:line 315

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: c:\Users\karta\Desktop\Unity Projects\2D Platformer Project\Assembly-CSharp.csproj
~~~

I’ve never seen even one person use this Omnisharp thing in a Unity context.

Either way, this may help you with intellisense problems, which might fix up your actual issue:

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: No suggestions in Vscode

1 Like

hi
i have unity hub linux version i cannot find my unity editor or projects in my unity hub

Thanks Kurt! Downloading Mono (and adding “omnisharp.useGlobalMono”:“always” to the json launch settings) is what solved it for me.

1 Like