本文介绍了Visual Studio Team Services构建错误MSB4019:导入的项目“C:\Program Files(x86)\ MSBuild \Reporting Services \ Microsros.ReportingServices.MSBuilder.targets”没找到。确认< Import>中的路径声明是正确的,那个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在VSTS上有一个项目,它有一个针对所有拉取请求运行的自动构建定义。 这个版本一直工作正常,直到本周我们开始收到以下错误:

We have a project on VSTS that has an automated build definition that runs against all pull requests.  This build has been working fine until this week when we started getting the following error:

Error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

我不确定问题是什么,我已经完成了其他步骤让我编辑< g class =" gr_ gr_299 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling"数据-GR-ID =" 299" id =" 299"> rptproj< / g> 文件,
但没有任何效果。 有人可以就如何解决这个问题给我一些建议吗?

I'm not sure what the issue is and I have gone through other steps that had me edit the <g class="gr_ gr_299 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="299" id="299">rptproj</g> file, but nothing is working.  Can someone please give me some advice on how to fix this?

推荐答案

感谢您在此发布。

您在VSTS中使用的构建任务是什么? MSBuild或Visual Studio Build?

What is build task you are using in the VSTS? MSBuild or Visual Studio Build?

在项目文件中,导入代码为:

In the project file, the import code is:

<Import Project="


MSBuildExtensionsPath的值取决于MSBuild版本,如果您使用的是Visual Studio 2017 / MSBuild 15.0,则此变量的值应为:

The value of MSBuildExtensionsPath is depends on the MSBuild version, if you are using Visual Studio 2017/MSBuild 15.0, the value of this variable should be:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Reporting Services

如果您使用的是Visual Studio 2015 / MSuild 14.0及更低版本,则值应为:

If you are using Visual Studio 2015/MSuild 14.0 and below, the value should be:

C:\Program Files (x86)\MSBuild

根据错误信息,值为C:\Program Files(x86)\ MSBuild,确保您没有在VSTS上使用VS2017 / MSBuild 15.0,并且你可以在那个文件夹上找到这个文件。

According to the error info, the value is C:\Program Files (x86)\MSBuild, make sure you are not using VS2017/MSBuild 15.0 on VSTS, and you can find this file on that folder.

如果上面没有帮助你,请你在这里分享你关于构建任务的配置吗? 

If above not help you, could you please share your configuration about Build task here? 

希望这会有所帮助。


这篇关于Visual Studio Team Services构建错误MSB4019:导入的项目“C:\Program Files(x86)\ MSBuild \Reporting Services \ Microsros.ReportingServices.MSBuilder.targets”没找到。确认&lt; Import&gt;中的路径声明是正确的,那个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 15:12