Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get "Visual Basic 12 does not support multiline string literals" in Visual Studio 2017?

I have an old ASP.NET Web Forms web site (VB) that I created years ago.

I am currently working with Visual Studio 2017, my web site is targeting the .NET 4.5 framework and everything works correctly.

Except when I try to use multi-line string literals, then I get this message:

"Visual Basic 12.0 does not support multi-line string literals."

But I know VS 2017 comes with VB 15. And if I create a new empty web site (VB) project, then I can use multi-line strings with no problems. So I guess I have to update a setting somewhere?

Please help. Thanks.

like image 903
Cesar Daniel Avatar asked May 20 '26 02:05

Cesar Daniel


1 Answers

This is what I did to fix the problem:

  1. Install the "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" NuGet package.
  2. Restart Visual Studio.

Thanks @rskar for the link.

like image 134
Cesar Daniel Avatar answered May 22 '26 20:05

Cesar Daniel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!