I am compiling a basic console app using :
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:exe /out:myapp.exe Program.cs
Which first prints :
Microsoft (R) Visual C# Compiler version 4.6.1038.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
Then fails because I am using string interpolation like $"{x}"
. The error is:
error CS1056: Unexpected character '$'
I assume this is because the csc.exe
does not understand C# 6
. How do I make this compiler C# 6
aware?