Skip to content

OmniSharp outputs error The "GetReferenceNearestTargetFrameworkTask" task was not found. #40721

@pquiring

Description

@pquiring
  • VSCode Version: 1.19.1
  • OS Version: Win10 1709

Steps to Reproduce:

  1. Load certain .csproj files
  2. Get following error message:

OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
The "GetReferenceNearestTargetFrameworkTask" task was not found.
Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with in the project file, or in the *.tasks files located in the
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin" directory.

Reproduces without extensions: No (OmniSharp is an extension)

This problem only happens with certain projects. When it happens OmniSharp doesn't run. I've tried many solns posted on stackoverflow such as make sure .Net 1.x is installed ,etc.
Problem is somewhat erratic, hard to find cause.

Metadata

Metadata

Assignees

Labels

tasksTask system issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions