Tag not monitored by Microsoft.
Compile errors with Tuples in .NET Framework 4.7.2
We are using Azure DevOps 2020 and building on a set of 2012 Server. The servers have MSBuild 14.0 and .NET Framework4.7.2 installed. These have worked fine until developers started using the Tuple<> contruct in Visual Studio 2019 on their work stations.
The project ius using 4.7.2
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
"C:\Users\SVC_ADT_TFS_RW\AppData\Local\Temp.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
We get this compile error;
Using shared compilation with compiler from directory: C:\Program Files (x86)\MSBuild\14.0\bin
##[error]src\Libraries\Server\ExtranetFacade.Rehash.cs(363,21): Error CS1001: Identifier expected
ExtranetFacade.Rehash.cs(363,21): error CS1001: Identifier expected [D:\TFSData\agent.7\_work\2\s\src\Libraries\Server\Web.Server.csproj]
##[error]src\Libraries\Server\ExtranetFacade.Rehash.cs(363,21): Error CS1003: Syntax error, '>' expected
ExtranetFacade.Rehash.cs(363,21): error CS1003: Syntax error, '>' expected [D:\TFSData\agent.7\_work\2\s\src\Libraries\Server\Web.Server.csproj]
##[error]src\Libraries\Server\ExtranetFacade.Rehash.cs(363,21): Error CS1519: Invalid token '(' in class, struct, or interface member declaration
ExtranetFacade.Rehash.cs(363,21): error CS1519: Invalid token '(' in class, struct, or interface member declaration [D:\TFSData\agent.7\_work\2\s\src\Libraries\Server\Web.Server.csproj]
##[error]src\Libraries\Server\ExtranetFacade.Rehash.cs(363,26): Error CS1519: Invalid token ',' in class, struct, or interface member declaration
ExtranetFacade.Rehash.cs(363,26): error CS1519: Invalid token ',' in class, struct, or interface member declaration [D:\TFSData\agent.7\_work\2\s\src\Libraries\Server\Web.Server.csproj]
##[error]src\Libraries\Server\ExtranetFacade.Rehash.cs(363,44): Error CS1519: Invalid token ')' in class, struct, or interface member declaration
ExtranetFacade.Rehash.cs(363,44): error CS1519: Invalid token ')' in class, struct, or interface member declaration [D:\TFSData\agent.7\_work\2\s\src\Libraries\Server\Web.Server.csproj]
##[error]src\Libraries\Server\ExtranetFacade.Rehash.cs(363,47): Error CS1520: Method must have a return type
This is the line of code that casues the error
public async Task<(bool, RehashRuleResult)> IsRehashable(int id, string userName, bool isFinalize = false)
{
I reinstalled the most recent version of 4.7.2 just to be sure. I also installed 4.8.0 again, just in case. I'm at a loss of what to try next. I was wondering if it's the MSBuild version. Unfortunatly the MSBUild installer doesn't like 2012 Server.
I am at a loss. What do I need to do, preferrably short of installing VS2019 on the server, to get the code to compile Tuple?