MSBuildCommunityTasks文件夹丢失

时间:2018-12-03 22:04:06

标签: c# asp.net visual-studio msbuildcommunitytasks

asp.net C#Web解决方案的新管理员

当我对项目运行msbuild时出现错误:

 error MSB4226: The imported project "C:\
Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Target
s" was not found. Also, tried to find "MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" in the fallback search pa
th(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program F
iles (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe.Config". Confirm that the path in the <I
mport> declaration is correct, and that the file exists on disk in one of the search paths.

项目文件的前三行代码:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />

我正在运行MS Community2017。我读到MSBuild已包含在安装中。我不太了解这是什么;社区任务与msbuild不同吗?它没有附带吗,我是否需要单独下载它与VS2017一起安装的msbuild

非常感谢您的帮助-

Thx,

博伊德

1 个答案:

答案 0 :(得分:2)

MSBuild社区任务是一个单独的设置:https://github.com/loresoft/msbuildtasks