New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# Interactive doesn't work with tuple syntax when desktop framework 4.7 is installed #17157
Comments
The important piece of information here is that the machine has a pre-release version of .NET Framework 4.7 |
Or, if you think as a customer, the customer installed VS2017 and tuples don't work on interactive environments. Isn't .NET Framework 4.7 a requirement of VS2017? I sure didn't explicitly install it. |
It is not. Windows Insider update would install it. |
OK! I've noticed that, although the interactive uses the mscorlib ValueTuple, in projects (.NET Framework or .NET Core), the System.ValueTuple package is required. |
Fixed by #17192 (this let the EE and Interactive handle the duplicate ValueTuple type and pick the one from the app instead of the one from mscorlib). There will also be a follow-up to have GAC type unification, so the compiler workaround isn't needed (targeting desktop 4.7.1 framework). |
@jcouv, does "summer timeframe" mean that the problem will be in VS2017RTM? |
Yes. At this point RTM has a very high bar for accepting fixes (crashes and such). So this fix didn't make it into RTM. Sorry about that. |
At least, make that noticeable in the release notes and release a script to fix .rsp files. |
Seems to be related to:dotnet/roslyn#17157 - I'm guessing I should ignore this and let the dust settle first.
I just hit the same issue. @paulomorgado's fix doesn't seem to work for me, I still get the same error. |
Run this:
You'll see which rsp files have the reference. |
Thanks @paulomorgado, that was it. I had a csi.rsp in |
Beware of any VS updates. I think it will "repair" that. |
Version Used:
Microsoft Visual Studio Enterprise 2017 RC 15.9.9-RC4+26206.0
Microsoft (R) Visual C# Interactive Compiler version 2.0.0.61404
Steps to Reproduce:
(1,2)
csi.exe
(1,2)
Expected Behavior:
Outputs
[(1, 2)]
Actual Behavior:
Microsoft Visual Studio Enterprise 2017 RC 15.9.9-RC4+26206.0
(1,13): error CS8179: Predefined type 'System.ValueTuple`2' is not defined or imported
Microsoft (R) Visual C# Interactive Compiler version 2.0.0.61404
(1,1): error CS8179: Predefined type 'System.ValueTuple`2' is not defined or imported
(1,1): error CS0029: Cannot implicitly convert type '(string, int)' to 'object'
Workaround
Remove
From
Remove
From
The text was updated successfully, but these errors were encountered: