I have a large WPF application with many solutions and each solution has many projects. IronRuby (v1.0.4) script is used to compile all the projects in order.
Problem Statement:
IronRuby script fails to compile projects which use 'nameof' operator with the following error:
The name 'nameof' does not exist in the current context
- Failure is seen on machines with Visual Studio 2017 & 2019.
- Works fine on machines with Visual Studio 2015.
- If I compile the project individually in VS 20XX, projects are correctly compiled - but that defeats the purpose of having an IR script.
I have searched everywhere but couldn't find the reason it is not working for higher versions of Visual studio.
Software Stack:
1. IronRuby verion: 1.0.4
2. Net version: 4.5.2 and above
3. Working VS version: 2015 update 3
3.(a) MSBuild Tool version: 14.0
C:\Program Files (x86)\MSBuild\14.0\Bin>MSBuild.exe -version Microsoft (R) Build Engine version 14.0.27522.0 Copyright (C) Microsoft Corporation. All rights reserved.
14.0.27522.0
3.(b) Message while compiling the projects from command prompt:
Microsoft (R) Build Engine version 14.0.27522.0
Copyright (C) Microsoft Corporation. All rights reserved.
- Non- working VS version: 2019 (v16.2.3)
4.(a) MSBuild tool version: 16.0
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin>MSBuild.exe -version Microsoft (R) Build Engine version 16.2.37902+b5aaefc9f for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved.
16.2.37902.0
4.(b) Message while compiling the projects from command prompt:
Microsoft (R) Build Engine version 4.7.3190.0
[Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft
Corporation. All rights reserved.
- MSBuild version on both machines give the same result:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>MSBuild.exe -version Microsoft (R) Build Engine version 4.7.3190.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved. 4.7.3190.0
Comparing 3(a), 3(b) with 4(a), 4(b), looks like there is a disconnect in higher VS version wrt build engine, but I am not able to resolve the issue which is preventing me from going to higher VS version.
Any help is appreciated.
Thanks,
RDV