visual studio 2015 - TFS won't compile string interpolation syntax -


i updated visual studio 2015 when released last week. resharper suggested might update following string using string.format:

string filepath = httpcontext.server.mappath(string.format("~/app_data/{0}.xlsx", guid.newguid())); 

to use string interpolation:

string filepath = httpcontext.server.mappath($"~/app_data/{guid.newguid()}.xlsx"); 

i did this, , well.

however i've broken build on tfs:

controllers\mycontroller.cs (224): unexpected character '$'

so seems new features in c# 6 can't compiled our older, non-updated version of tfs.

the project still targeted @ using framework 4.5 however, have not targeted 4.6. (wrongly) assumed still targeting old framework mean built other team members still using vs2013 along our tfs build server.

so looks our tfs needs update of... something.

what need install on tfs server have compile new syntax? latest version of .net framework or else?

install .net framework 4.6 , build tools 2015 on build server. override toolsversion (/tv:14.0) in msbuild arguments.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -