0

Oh, the most annoying thing ever :( So I spent some time trying to get my old application to compile using c# 7 and managed it, now that is finally working I was ready to setup devops.

I created my pipeline as usual, but the first issue was when I pushed a build, it moaned about not supporting .net 4.7.2. Awesome. So I downgraded the project to 4.6.2 and then ran my pipeline again and now I get this:

Invalid token '=>' in class, struct, or interface member declaration

I have checked the nuget restore in devops and it is using .net compilers 2.10.0. I am at a loss. Does anyone know how I can fix this?

r3plica
  • 13,017
  • 23
  • 128
  • 290
  • some of our projects target c#7 and are built with pipelines with no issue. Did you target vs2017 ? – NicoD Jan 18 '19 at 13:07

2 Answers2

1

Your Agent pool may need to be Hosted VS2017.

As @NicoD mentioned, we also are building c# 7 projects with no issues by targeting this host.

enter image description here

Josh Gust
  • 4,102
  • 25
  • 41
0

For other users who have custom/hosted agents, you have to install this in server where agent runs:

Dani
  • 1,825
  • 2
  • 15
  • 29