Hi,
I think this is not due to vs2015 or 2017, this is due to the fact you cannot use the '-' character in a variable name.
With C#, a variable name must start with either a letter, an underscore character (_), or the at symbol (@). Subsequent characters may only be letters, underscore characters, or numbers.
If you need to paste a string containing a '-', you have to enter a double quote before pasting it.