The reference assemblies for .NETFramework,Version=v5.0 were not found when using global Mono
See original GitHub issueHi Omnisharp team,
I have been developing a web api using dotnet 5. and when I launched the vscode this morning I realised the Intellisense stopped working even though I haven’t had any issues last night. I haven’t made any changes since then
Here is the log I get from Omnisharp
Starting OmniSharp server at 10/20/2020, 6:56:50 PM
Target: /Users/aybarsacar/Desktop/cs/DatingApp/DatingApp.sln
OmniSharp server started with Mono 6.12.0.
Path: /Users/aybarsacar/.vscode/extensions/ms-dotnettools.csharp-1.23.4/.omnisharp/1.37.3/omnisharp/OmniSharp.exe
PID: 1586
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 10.15.7 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 16.8.0 - "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin"
2: StandAlone 16.8.0 - "/Users/aybarsacar/.vscode/extensions/ms-dotnettools.csharp-1.23.4/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 16.8.0 - "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin"
CscToolExe = csc.exe
CscToolPath = /Users/aybarsacar/.vscode/extensions/ms-dotnettools.csharp-1.23.4/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin/Roslyn
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/aybarsacar/Desktop/cs/DatingApp'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/aybarsacar/Desktop/cs/DatingApp/DatingApp.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/aybarsacar/Desktop/cs/DatingApp/API/API.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/aybarsacar/Desktop/cs/DatingApp'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/aybarsacar/Desktop/cs/DatingApp/API/API.csproj
[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.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/aybarsacar/Desktop/cs/DatingApp' on host 1566.
[fail]: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v5.0 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
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/aybarsacar/Desktop/cs/DatingApp/API/API.csproj'.
/Users/aybarsacar/Desktop/cs/DatingApp/API/API.csproj
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v5.0 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
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/aybarsacar/Desktop/cs/DatingApp/API/API.csproj
here is my dotnet info:
.NET SDK (reflecting any global.json):
Version: 5.0.100-rc.2.20479.15
Commit: da7dfa8840
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/5.0.100-rc.2.20479.15/
Host (useful for support):
Version: 5.0.0-rc.2.20475.5
Commit: c5a3f49c88
.NET SDKs installed:
3.1.402 [/usr/local/share/dotnet/sdk]
5.0.100-rc.2.20479.15 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0-rc.2.20475.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0-rc.2.20475.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
and my csproj file
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.1"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-rc.2.20475.6"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.0-rc.2.20475.6"/>
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1"/>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0-rc.2.20475.17"/>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.0"/>
<PackageReference Include="CloudinaryDotNet" Version="1.11.0"/>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0-rc.2.20475.17"/>
</ItemGroup>
</Project>
cheers!
Aybars
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:8 (2 by maintainers)
Top Results From Across the Web
The reference assemblies for framework .NETCore, Version ...
The reference assemblies for framework .NETCore, Version=v5.0 were not found. According to the error log, it seems you are missing the .
Read more >Error MSB3644: The reference assemblies for framework ...
NETFramework,Version=v5.0” were not found. ... Note that assemblies will be resolved from the Global Assembly Cache ... Click on the “Use .
Read more >Assemblies and the GAC - Mono Project
The Global Assembly Cache (GAC) is a central repository for storing shared assemblies. The GAC allows multiple versions of the same assembly to...
Read more >Can't get Intellisense working - Unity Forum
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) ...
Read more >Reference Assemblies For Framework ".Netframework ...
Build fails with: The reference assemblies for.NETFrameworkVersionv4.5.1 were not found.To resolve this install the Developer Pack SDK/Targeting Pack for.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having this same problem with the latest stable
mono
from the official package and the C# extension version1.23.4
for VSCode and dotnet core 3.1 stable.There are differences in the embedded version of mono
16.12.0.90
. The msbuild version bundled in omnisharp is16.8.0-preview-20475-05+aed5e7ed0
.Global mono
Uninstalling the global mono or setting the UseGlobalMono option for vscode in settings.json to “never” resolves the problem.
~~If you run into this issue please post the output of your
mono -V
command. If it is lower thanMono JIT compiler version 6.12.0.90
, then make sure to download latest stable from here https://www.mono-project.com/download/stable/~~Older Mono cannot handle .NET 5.0 RC2.You can also tell OmniSharp to stop using global Mono by setting
"omnisharp.useGlobalMono": "never"
in the VS Code settings and restarting VS Code.edit: we are still waiting for the updated Mono release here https://github.com/mono/mono/issues/20250