“GetReferenceNearestTargetFrameworkTask";未找到任务 [英] The "GetReferenceNearestTargetFrameworkTask" task was not found

查看:93
本文介绍了“GetReferenceNearestTargetFrameworkTask";未找到任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS 2017 社区中遇到自动完成问题.

以前我在学校有 VS 2017 Enterprise,但密钥过期了,所以我搬到了社区.

以前,一切都很好,但现在根本不行.

我在 Stack Overflow

这应该可以解决您在此问题中看到的错误.重新启动 Visual Studio 并测试自动完成功能.如果它不起作用,请参阅 this 问题的答案,因为这是一个整体不同的问题.

I have a problem with autocompletion in VS 2017 Community.

Previously I had VS 2017 Enterprise from school, but the key expired so I moved to Community.

Before, everything works great, but now it doesn't work at all.

I found a solution on Stack Overflow here but it doesn't work, so found another solution at GitHub here.

And I got this:

Build FAILED.

C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuild15.0BinMicrosoft.Common.CurrentVersion.targets(1601,5): error MSB4036: 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 Studio2017CommunityMSBuild15.0Bin" directory. 0 Warning(s) 1 Error(s)

Time Elapsed 00:00:00.11

Do you know what to do next?

解决方案

Follow these to fix that error. This applies to VS 2017:

Fix 1:

1.Install Nuget PackageManager from here.

2.Restart Visual Studio.


If the problem is still there, continue below

Fix 2:

1.Download and start/run the Visual Studio Installer again.

2.While the Visual Studio Installer is still running, go to the "Individual Components" tab

3.Tick the "NuGet package manager" check-box that is under "Code tools" option.

4.Click Install to install it.

Screenshot of where this is located:

That should fix the error you see in this question. Restart Visual Studio and test the auto-completion function. If it's not working, see the answers from this question as that is a whole different issue.

这篇关于“GetReferenceNearestTargetFrameworkTask";未找到任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆