Reputation: 23
After installation .Net 4.6.1 on TeamCity BuildAgents machine I have error in buildstep where I have to use MSBuild 2015.
Error say:
Unable to find MSBuild at C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe\MSBuild.exe, please check MSBuild environment variable to target to Microsoft .NET Framework 2.0/3.5/4.0 or Mono installation directory
Where I can define again path of MSBuild?
When I go to Agents >> Agent Parameters >> Environment Variables
I have parameter like that:
msbuild C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
Uninstall .nets (4.5.1,4.5.2,4.6.1) ane MSbuild and MSbuild Tools did not work. Also try setup new agent but at the end I had the same problem.
Upvotes: 0
Views: 654
Reputation: 23
I found solution.
I have edited: buildAgent.properties
At the end of file I just add: env.msbuild=C:\Program Files (x86)\MSBuild\14.0\Bin
Now in Agent Properties is only path without EXE file in.
Upvotes: 1