0
votes

I've inherited a build process (Just a disclaimer - I didn't write this stuff!!) that starts off running a .proj file. I'm trying to convert this to a TFS2017 build and running into problems. The .proj file starts with the following:

<UsingTask TaskName="Microsoft.TeamFoundation.Build.Tasks.GetBuildProperties"
    AssemblyFile="$(VS120COMNTOOLS)..\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll"
    Condition=" '$(BuildUri)' != '' "/>

VS120COMNTOOLS resolves to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\, so C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\IDE\PrivateAssemblies\Microsoft.TeamFoundation.Build.ProcessComponents.dll does exist, but it's not resolving for some reason.

The error I get is this:

InitVariables:
Running InitVariables TeamFoundationServerUrl= BuildUri=
installer\dev\common\UpdateVersionInfo\uvi.proj(66,5): Error MSB4036: The "GetBuildProperties" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\MSBuild\14.0\bin" directory.

Any idea why?

1
BTW, I did try changing the MSBuild version to 12.0 and I also copied Microsoft.TeamFoundation.Build.ProcessComponents.dll to the c:\program files (x86)\MSBuild\12.0\bin and 14.0\bin folders.Ben_G
What is the intent here? I'd recommend recreating the intent of the build rather than trying to directly port a TFS 2008-style build proj file.Daniel Mann
I think you're probably right. The intent is to increment build version numbers based on values in the registry, so I'm just going to write something in C# to do this.Ben_G
@Ben_G Have you resolved the issue? any update?Andy Li-MSFT
No - the issue wasn't resolved, but it's a non-issue. I'm just going to re-write it using a C# program using the TFS2017 build process.Ben_G

1 Answers

0
votes

As the project is created with an too old engine, some dependencies/components may cannot be referenced correctly in the new engine.

In my opinion, no need to spend too much time to debug this problem. Just as Daniel said, we recommend recreating the intent of the build rather than trying to directly port a TFS 2008-style build proj file.

So, you can rewrite it using a C# program apply for the TFS2017 build process.