Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone,

I am getting the error as follows:
Error	4	SA1027: Tabs are not allowed. Use spaces instead


I have check the setting as follows
under Tools - Options - Text Editor - C# - Tabs  to uses spaces...

Click Edit - Advanced - Format Document.
.Also i have done ctrl+k+d .But no Use.

It does not work for me .
Please Advice

Thanks Harshal
Posted

First of all, what you see is not what you think you see.
The message you got has nothing to do with your correctness, it's a StyleCop error and only talk about the styling of your code.
You can get rid of it by selection all of your code (CTRL+A), than Edit->Advanced->Untabify Selected Lines
And of course you can change the rules for StyleCop if it is in your power...
 
Share this answer
 
Comments
R Harshal 16-Jun-14 5:11am    
According to your solution ,It gives me the same error .
Its not work for me.
Please Advice.
Thanks
Harshal
Kornfeld Eliyahu Peter 16-Jun-14 5:30am    
See Tools->Options->Text Editor->C#->Tabs
You may change 'Keep tabs' to 'Insert Spaces' so VS will not change all your space s to tab again on every save...
R Harshal 16-Jun-14 6:35am    
I have already done this but no use .
Kindly Revert.
Thanks Harshal
Hi Team,
It was solved .
Thanks.
Harshal
 
Share this answer
 
Comments
BillW33 16-Jun-14 16:46pm    
You should not post a comment to a solution or an addition to your question as a "Solution". Either add a comment to a previous solution by pressing the "Have a Question or Comment?" button or update your question by using the "Improve question" button. I did not vote, but I thought you should know why this might be downvoted.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900