Question
Roelof1967 on Tue, 14 Mar 2017 20:20:38
Hello,
For a project I used the System.ValueType.
So I added that Nuget muts download it and I see that I does.
But still the build fails when I want to use it with this error message : SwapNumbers\SwapNumbers\SwapNumbers\Program.cs(22,23): Error CS1519: Invalid token '(' in class, struct, or interface member declaration
How can I tell the build that I must use the Nuget package.
When I do it locally I do not have any problem.
Replies
Nayana A S on Wed, 15 Mar 2017 09:38:12
You can refer the below link which described how to use Team Builds to work with NuGet packages https://www.visualstudio.com/en-us/docs/package/build/team-build-nuget
Also, you can refer https://www.visualstudio.com/en-us/docs/package/overview
Roelof1967 on Wed, 15 Mar 2017 12:10:02
Thanks,
I now made a nuget.config but on some way when I open the team explorer this one is not seen so the nuget.config is not send to the team services page.
Is there maybe a reason why VS2017 do not see the change.
Roelof1967 on Wed, 15 Mar 2017 14:18:04
Can it be that MS build services do not use c# 7
My problem is that I use a feature of c#7
Nayana A S on Fri, 17 Mar 2017 16:20:06
This is not a package management issue. You are using a version of the compiler which does not support C#7 syntax.
If it were a package management issue, the compiler would be complaining about a missing type, rather than a syntax error.