none
Missing file from install of VS 2015 and update 1

    Question

  • Hi,

    We are just rolling out VS 2015 and VS 2015 update 1. We are also using VS 2008 and VS 2012 Team Server.

    The problem we have is our Software engineers are not able to build certain things.

    The file missing is called "Microsoft.TeamFoundation.Build.targets"

    C:\Src\XXXXXXXXX\Core\TFSBuild.proj(8,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. 

    The only thing i can find says copy the file from a working install of VS. 

    Any help would be much appreciated

    Andy

    Wednesday, December 23, 2015 3:07 PM

All replies

  • My advice is to reinstall VS 2015 !
    Wednesday, December 23, 2015 4:11 PM
  • Thanks for Chourouk Hjaiej's reply.

    Hi Andy,

    When and where do you get this error message? When creating project or build a project with Visual Studio 2015?

    Please create a new blank project to check whether it is occurs with all projects or just this specific project. Then please repair your Visual Studio 2015 through Control Panel -> Programs -> Visual Studio 2015 -> Change -> Repair.

    In addition, please use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to Onedrive and share the link here.

    Best Regards,
    Weiwei


    Thursday, December 24, 2015 7:49 AM
    Moderator
  • Hi sorry its taken so long to respond. With Christmas and all that. The tech lead on this has asked me to ask this question

    We have projects that were created to build with the TFS2008 build system using msbuild. We also need to build these on development machines from the command line. Typically we will run a command like:

    msbuild.exe tfsbuild.proj

    However on a machine with only VS2015 installed this will fail with the error given below:

    error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

    Previously the file Microsoft.TeamFoundation.Build.targets was installed with VS at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets, but this doesn’t seem to be the case with VS2015.

    What is the correct way of getting this file or making this build process work please?

    Many thanks for all your help

    Wednesday, January 13, 2016 8:48 AM
  • Hi Andy,

    According to your description, you want to build your project in local development machine, and your project is in a server machine. Please install a Visual Studio on your server machine, which will install all the requirements for builds, like MSBuild, frameworks and SDKs. Then please try build with command again.

    Please refer to:

    http://stackoverflow.com/questions/17071059/convert-tfsbuild-proj-to-msbuild-script

    Best Regards,
    Weiwei

    Thursday, January 14, 2016 1:12 AM
    Moderator