我在 VS 2017 社区中遇到自动完成问题。
之前我从学校获得了 VS 2017 Enterprise,但 key 已过期,所以我转到了社区。p>
以前,一切都很好,但现在根本不起作用。
我在 Stack Overflow 上找到了解决方案 here但它不起作用,所以在GitHub上找到了另一个解决方案here .
我得到了这个:
Build FAILED.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.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 Studio\2017\Community\MSBuild\15.0\Bin" directory. 0 Warning(s) 1 Error(s)
Time Elapsed 00:00:00.11
你知道下一步该做什么吗?
最佳答案
我有相同的错误消息,但问题不同。
因此,我使用 MSBuild 来自动化 Azure Functions 的构建/部署过程。一切都工作正常,直到我更新了 Visual Studio 2017 和 Visual Studio Build Tools 2017,此时我开始收到此错误。准确地说,我仅在使用 MSBuild 时收到此错误,从 VS 手动构建项目工作正常。
就我而言,我已经按照@Programmer的答案设置了所有内容。 但当我使用 MSBuild 时,我发现我还必须安装 NuGet 目标和构建任务,它们是 Visual Studio 构建工具的一部分。
关于visual-studio - "GetReferenceNearestTargetFrameworkTask"未找到任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47797510/