0
votes

I have following tools installed on my machine:

  • TFS 2017
  • Visual Studio 2017
  • MSBuild 14.0

In my application, I'm using some C#6 elements like string interpolation ($).

When I try to build it, controller says that it could not resolve the symbol.

Builds fail for both XAML and standard definitions.

In build logs, there's an information that it uses correct MSBuild 14.0 path: C:\Program Files (x86)\MSBuild\14.0\bin, but still failes to resolve C#6 elements.

I would really appreciate if you would help me with this problem, I've searched entire internet and found nothing :/

If you guys need any information, I'll be more than happy to provide it. Thank you.

1
What's your detail version of TFS?PatrickLu-MSFT

1 Answers

0
votes

TFS with XAML build is just using MSBuild to run the build. You could first try to use MSBuild command to run the build test locally, which will narrow down the issue.

If it works well on your dev machine and not works from a TFS server build. Very likely the environment problem.

To make sure the build successful, you should keep your build server environment the same with your local environment. Please double check this.

For trouble shooting, you could try to remote to your build agent, manually run your build and test on your build agent.

As for how to enable C#6, you could also refer this similar question, modify TFSBuildServiceHost.exe.config file which may do the trick. How do I enable C# 7 builds in Team Foundation Server 2015?

If you still get error, please include detail build failed logs here.