2

I am facing this issue while Continuous Integration from Visual Studio Team Services.

I have followed stackoverflow link: MSBuild target package not found.

  • I have installed .net Framework 4.5 on Build server machine.
  • Installed web deployment tool too.
  • Created "Microsoft\VisualStudio\v14.0" folders in "C:\Program Files(x86)\MSBuild\Microsoft" and pasted "Web" and "WebApplication" folder from DEV machine (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0) and past into build server machine on newly created folder path i.e C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0

But still I am facing the same issue.

NOTE: I have given configuration details on below stackoverflow lin: Task VSBuild failed. This caused the job to fail.

Community
  • 1
  • 1
VINOD Bhoite
  • 81
  • 2
  • 8
  • Finally, issue is resolved. Above stackoverflow link solution is correct. Only missing point from my side is, I did all configutaiton only on one port. We need to do all this configuration on the all 5 ports. When I did this, problem is solved automatically. – VINOD Bhoite Aug 22 '16 at 09:59
  • 1
    Possible duplicate of [MSBuild target package not found](http://stackoverflow.com/questions/2607428/msbuild-target-package-not-found) – jessehouwing Dec 18 '16 at 12:53

1 Answers1

0

I faced the similar Issue . I Added below lines to my .csproj file and it worked

 <PropertyGroup>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
     <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)       </VSToolsPath>
 </PropertyGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />

 <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

for more info check below answer error MSB4057: The target "Package" does not exist in the project file named MVCWebUIComponent.csproj

MSBuild target package not found

Saurabh Raoot
  • 1,303
  • 3
  • 26
  • 31