arman
arman

Reputation: 869

What’s “tabs are not allowed in f# code unless the #indent off option is used” Error?

what’s “tabs are not allowed in f# code unless the #indent off option is used” Error? I use the last version .netcore and vs 2019. I want to use the lightweight syntax

enter image description here

Upvotes: 1

Views: 996

Answers (1)

Reed Copsey
Reed Copsey

Reputation: 564433

When using lightweight syntax, you must use spaces, not tabs, for indentation.

Most editors have an option (including Visual Studio, by default) will turn a tab into spaces automatically when you type. I suspect this was written in a different editor and opened in VS.

In Visual Studio 2019, if you select everything in your document, and do Edit->Advanced->Untabify Selected Lines, it will correct it for you, as well.

Upvotes: 2

Related Questions