解决方案的新开发人员。我有源代码。当我尝试编译时,出现以下错误。
以前,我在另一台计算机上通过在项目上让另一个开发者将他的文件夹压缩并将其发送给我,来解决此问题。但是我想了解如果我是该项目的新手,我将如何解决此问题。假设我不必依靠某人将压缩的.target文件夹发送给我。
错误:
C:\Users\boyd\Source\Repos\insightstobehavior\Classroom_Package.proj(3,11):
error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual S
tudio\2017\Community\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targ
ets" was not found. Also, tried to find "MSBuildCommunityTasks\MSBuild.Communit
y.Tasks.Targets" in the fallback search path(s) for $(MSBuildExtensionsPath) -
"C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Progra
m Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.e
xe.Config". Confirm that the path in the <Import> declaration is correct, and t
hat the file exists on disk in one of the search paths.
从.project-
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
最佳答案
要解决此问题,您应该安装msbuildtasks
msi安装程序:
https://github.com/loresoft/msbuildtasks/releases/download/1.5.0.235/MSBuild.Community.Tasks.v1.5.0.235.msi
您可以检查此MSBuild社区任务的readme.md:
安装该msi文件后,您将在路径MSBuild.Community.Tasks.Targets
中找到文件C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks
。
这样可以解决此问题。
希望这可以帮助。
关于c# - 找不到错误MSB4226 MSBuild.Community.Tasks.Targets”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53107074/