Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Getting Multiple Fails in OmniSharp Log in Visual Studio Code

Discussion in 'Scripting' started by Only4gamers, Oct 10, 2020.

  1. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    327
    Hello everyone,
    I am getting multiple Fails and Warnings in Visual Studio Code in OmniSharp Log. Maybe because of this I am not getting any suggestion in VS Code. Here is full Log:

    Code (CSharp):
    1. Starting OmniSharp server at 10/10/2020, 7:24:57 PM
    2.     Target: d:\Unity Backups\New Space RTS\New Space RTS.sln
    3.  
    4. OmniSharp server started.
    5.     Path: c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\OmniSharp.exe
    6.     PID: 6608
    7.  
    8. [info]: OmniSharp.Stdio.Host
    9.         Starting OmniSharp on Windows 6.2.9200.0 (x64)
    10. [info]: OmniSharp.Services.DotNetCliService
    11.         DotNetPath set to dotnet
    12. [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    13.         Located 1 MSBuild instance(s)
    14.             1: StandAlone 16.8.0 - "c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin"
    15. [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    16.         MSBUILD_EXE_PATH environment variable set to 'c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin\MSBuild.exe'
    17. [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    18.         Registered MSBuild instance: StandAlone 16.8.0 - "c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin"
    19.             CscToolExe = csc.exe
    20.             CscToolPath = c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin\Roslyn
    21.             MSBuildExtensionsPath = c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild
    22.             MSBuildToolsPath = c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin
    23. [info]: OmniSharp.Cake.CakeProjectSystem
    24.         Detecting Cake files in 'd:\Unity Backups\New Space RTS'.
    25. [info]: OmniSharp.Cake.CakeProjectSystem
    26.         Could not find any Cake files
    27. [info]: OmniSharp.MSBuild.ProjectSystem
    28.         Detecting projects in 'd:\Unity Backups\New Space RTS\New Space RTS.sln'.
    29. [info]: OmniSharp.MSBuild.ProjectManager
    30.         Queue project update for 'd:\Unity Backups\New Space RTS\Assembly-CSharp.csproj'
    31. [info]: OmniSharp.MSBuild.ProjectManager
    32.         Queue project update for 'd:\Unity Backups\New Space RTS\Assembly-CSharp-Editor.csproj'
    33. [info]: OmniSharp.Script.ScriptProjectSystem
    34.         Detecting CSX files in 'd:\Unity Backups\New Space RTS'.
    35. [info]: OmniSharp.Script.ScriptProjectSystem
    36.         Could not find any CSX files
    37. [info]: OmniSharp.MSBuild.ProjectManager
    38.         Loading project: d:\Unity Backups\New Space RTS\Assembly-CSharp.csproj
    39. [info]: OmniSharp.WorkspaceInitializer
    40.         Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    41. [info]: OmniSharp.WorkspaceInitializer
    42.         Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
    43. [info]: OmniSharp.WorkspaceInitializer
    44.         Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
    45. [info]: OmniSharp.WorkspaceInitializer
    46.         Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
    47. [info]: OmniSharp.WorkspaceInitializer
    48.         Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
    49. [info]: OmniSharp.WorkspaceInitializer
    50.         Configuration finished.
    51. [info]: OmniSharp.Stdio.Host
    52.         Omnisharp server running using Stdio at location 'd:\Unity Backups\New Space RTS' on host 8784.
    53. [fail]: OmniSharp.MSBuild.ProjectLoader
    54.         The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
    55. [warn]: OmniSharp.MSBuild.ProjectManager
    56.         Failed to load project file 'd:\Unity Backups\New Space RTS\Assembly-CSharp.csproj'.
    57. d:\Unity Backups\New Space RTS\Assembly-CSharp.csproj
    58. c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1178,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
    59.  
    60. [info]: OmniSharp.MSBuild.ProjectManager
    61.         Loading project: d:\Unity Backups\New Space RTS\Assembly-CSharp-Editor.csproj
    62. [fail]: OmniSharp.MSBuild.ProjectLoader
    63.         The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
    64. [warn]: OmniSharp.MSBuild.ProjectManager
    65.         Failed to load project file 'd:\Unity Backups\New Space RTS\Assembly-CSharp-Editor.csproj'.
    66. d:\Unity Backups\New Space RTS\Assembly-CSharp-Editor.csproj
    67. c:\Users\Hi\.vscode\extensions\ms-dotnettools.csharp-1.23.2\.omnisharp\1.37.1\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1178,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
    68.  
    69. [fail]: OmniSharp.MSBuild.ProjectManager
    70.         Attempted to update project that is not loaded: d:\Unity Backups\New Space RTS\Assembly-CSharp.csproj
    71. [fail]: OmniSharp.MSBuild.ProjectManager
    72.         Attempted to update project that is not loaded: d:\Unity Backups\New Space RTS\Assembly-CSharp-Editor.csproj
    73.  
    I am using:
    > Unity 2019.4.6f1
    > VS Code v1.48 with only one extension "C# for Visual Studio Code"
    > .NET Framework 4.8 Developer Pack
    > Latest .NET Core SDK
    > Latest Windows 10

    I've tried like every solution available in different forums but it didn't fix this problem.

    Do I need to install Mono also?
     
    Last edited: Oct 10, 2020
  2. Sphinks

    Sphinks

    Joined:
    Apr 6, 2019
    Posts:
    267
    "Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application..."

    [fail]: OmniSharp.MSBuild.ProjectLoader: The reference assemblies for .NETFramework,Version=v4.7.1 were not found.

    Did you try to install .Net 4.7.1 ? Because it looks like it´s needed. Do you have any references to that version or is it in any config maybe ?
     
    Only4gamers likes this.
  3. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    327
    I just installed 4.7.1 few minutes ago and it's working fine now. I thought 4.7.1 included in 4.8. Thanks for reply.