4
votes

I'm having a TFS 2013 build error with the new VS 2015 string interpolation syntax (Unexpected character '$'). I have modified the "Run MSBuild for Project" task of the build process template like so, but it's still not helping.

  • CommandLineArguments: String.Format("/p:SkipInvalidConfigurations=true {0} /tv:14", MSBuildArguments)
  • ToolPath: "C:\Program Files (x86)\MSBuild\14.0\Bin"
  • ToolVersion: "14.0".

In the build definition, I also specified the "MSBuild Arguments" = /p:VisualStudioVersion=14.0.

Run MSBuild task properties

Build Definition

1
You are compiling C# 6.0 code and it's failing on String Interpolation, correct? Also, have you made sure that the build machine has VS 2015 and the version of msbuild you defined? Just making sure. - Matt
Yes and yes. The build machine has VS 2015 and I can build manually on the build machine successfully. I ended up upgrading to the TfvcTemplate.12.xaml. - AngieM

1 Answers

2
votes

For what it's worth, I gave up trying to figure this out and changed the build process template to TfvcTemplate.12.xaml and add this as the MSBuild arguments: /tv:14.0 /p:VisualStudioVersion=14.0 (in the build definition).

I know this won't help if someone can't upgrade to TfvcTemplate.12.xaml though.