Strange braces behavior

I have the problem that Visual Studio/Resharper removes line breaks when I try to start my application (the project is not shared with other people so it should not be a sharing problem). This happens in a way that when I press F5 or click on the run button with the mouse that a line break at the line where the cursor was the last time will be removed which is extremely annoying.

Example:

Before:

public void test(){
  int x = 5;
}

After running the solution:

public void test(){
  int x = 5;}


This issue occured after I reinstalled my Windows and installed everything new. I never had this issue before and I am also not sure if this is just some strange Visual Studio option or related to Resharper.
Maybe anyone experienced something similar before. I also attached my Resharper braces settings.

Attachment(s):
resharper.png
12 comments
Comment actions Permalink

Hello Thomas
     Could you please check if this stops happening when ReSharper is suspended under Tools | Options | ReSharper | General? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

I can confirm this behaviour with VS2010 SP1 and Resharper 6.1.1000.82.
It happens when either buildinging (F6) or running the project (F5) is invoked.

With Resharper suspendend, as suggested, the problem disappeared.

I have had this problem on numerous VS2010+Resharper installations and sometimes it could be really annoying!

0
Comment actions Permalink

Thank you for confirming this issue.
I really did not have time yet to try to disable resharper but if you also have the same problem it should be somehow related to this resharper version (at least it is 6.1.1), because I never hat the problem before.

0
Comment actions Permalink

Hello Thomas and Nikolai
     I'm afraid I wasn't able to repeat this behavior. Could you please attach the list of installed products from Help | About Visual Studio and full information from ReSharper | Help | About dialog (use Copy button)? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

Installierte Version: Ultimate

Microsoft Office Developer Tools   01019-532-2002102-70040
Microsoft Office Developer Tools

Microsoft Visual Basic 2010   01019-532-2002102-70040
Microsoft Visual Basic 2010

Microsoft Visual C# 2010   01019-532-2002102-70040
Microsoft Visual C# 2010

Microsoft Visual C++ 2010   01019-532-2002102-70040
Microsoft Visual C++ 2010

Microsoft Visual F# 2010   01019-532-2002102-70040
Microsoft Visual F# 2010

Microsoft Visual Studio 2010 Architecture und Modeling Tools   01019-532-2002102-70040
Microsoft Visual Studio 2010 Architecture und Modeling Tools

UML® und Unified Modeling Language™ sind Marken oder eingetragene Marken der Object Management Group, Inc. in den Vereinigten Staaten und anderen Ländern.

Microsoft Visual Studio 2010 Team Explorer   01019-532-2002102-70040
Microsoft Visual Studio 2010 Team Explorer

Microsoft Visual Web Developer 2010   01019-532-2002102-70040
Microsoft Visual Web Developer 2010

Rechtschreibprüfung für die Microsoft Visual Studio 2010-Codeanalyse   01019-532-2002102-70040
Rechtschreibprüfung für die Microsoft Visual Studio 2010-Codeanalyse

Teile von International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. Alle Rechte vorbehalten.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Elektronische Version unter Lizenz von Lernout & Hauspie Speech Products N.V. Alle Rechte vorbehalten.

AnkhSVN - Subversion Support for Visual Studio   2.3.10838.1211
AnkhSVN - Subversion Support for Visual Studio 2.3.10838.1211
* Ankh.Package 2.3.10838.1211
* Subversion 1.7.3 via SharpSvn 1.7003.2023.12943

SharpSvn is linked to: Apr 1.4.6, Apr-util 1.4.1, Neon 0.29.6, OpenSSL 1.0.0g 18 Jan 2012, serf 1.0.1, SQLite 3.7.10, Subversion 1.7.3-SharpSvn-1.7.3, ZLib 1.2.6
SharpSvn is dynamically linked to: Cyrus Sasl 2.1.23
SharpSvn is optionally linked to: Berkeley DB 4.4.20, SharpPlink 1.7003.2023.12943

Crystal Reports Templates for Microsoft Visual Studio 2010   
Crystal Reports Templates for Microsoft Visual Studio 2010

Devart dotConnect for PostgreSQL   5.70.311.0
Devart dotConnect for PostgreSQL
Copyright 2002 - 2012 Devart. All rights reserved.
Web: www.devart.com/dotconnect/postgresql
Support: support@devart.com

Devart Entity Developer   4.2.138.0
Devart Entity Developer
Copyright © 2008-2012 Devart. All rights reserved.
Web: www.devart.com/entitydeveloper
Support: support@devart.com

Hotfix für Microsoft Visual Studio 2010 Ultimate - DEU (KB2522890)   KB2522890
Dieser Hotfix ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2522890.

Hotfix für Microsoft Visual Studio 2010 Ultimate - DEU (KB2529927)   KB2529927
Dieser Hotfix ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2529927.

Hotfix für Microsoft Visual Studio 2010 Ultimate - DEU (KB2548139)   KB2548139
Dieser Hotfix ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2548139.

Hotfix für Microsoft Visual Studio 2010 Ultimate - DEU (KB2549864)   KB2549864
Dieser Hotfix ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2549864.

Hotfix für Microsoft Visual Studio 2010 Ultimate - DEU (KB2565057)   KB2565057
Dieser Hotfix ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2565057.

Hotfix für Microsoft Visual Studio 2010 Ultimate - DEU (KB2635973)   KB2635973
Dieser Hotfix ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird der Hotfix automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2635973.

JetBrains ReSharper 6.1   Full Edition build 6.1.1000.82 on 2012-02-15T15:14:48
JetBrains ReSharper 6.1 package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper/. Copyright © 2003–2012 JetBrains, Inc.

JetBrains TeamCity Addin 7.0   [build 21241 (7.0.613.69)]
TeamCity integration package for Microsoft Visual Studio. For more information, please visit http://www.jetbrains.com/teamcity.

Microsoft Visual Studio 2010 Ultimate - DEU Service Pack 1 (KB983509)   KB983509
Dieses Service Pack ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird das vorliegende Service Pack automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/983509.

NuGet Package Manager   1.6.21215.9133
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Oracle Developer Tools for Visual Studio   11.2.0.3.0
Oracle Developer Tools for Visual Studio Copyright (c) 2005, 2010

PostSharp   PostSharp

Sicherheitsupdate für Microsoft Visual Studio 2010 Ultimate - DEU (KB2645410)   KB2645410
Dieses Sicherheitsupdate ist für Microsoft Visual Studio 2010 Ultimate - DEU vorgesehen.
Wenn Sie später ein aktuelleres Service Pack installieren, wird dieses Sicherheitsupdate automatisch deinstalliert.
Weitere Informationen erhalten Sie unter http://support.microsoft.com/kb/2645410.

Telerik WPF VSExtensions   2012.01.320.0
Telerik RadControls for WPF VSExtensions Package

VisualHG   1.1.5
Mercurial source contol provider.

XtraReports package   1.0
XtraReports package

0
Comment actions Permalink

Hello Thomas
     I believe this is a weird compatibility issue. We'll try reproducing such Visual Studio configuration on our side. Meanwhile, could you please try disabling/uninstalling all other third-party extensions one-by-one and check if each steps fixes this problem? Thank you!

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Greetings , annoyed as well. I too have encountered this problem and its occuring more frequently now.
It started happening about 3 months after i have bought resharper 7.
No problems whatsoever until that time.

The unwanted behavior is same as explained above. When i click start/debug  or press f5.

                    foreach (String filename in filenames)
                    {
                       int testvar = 1;
                    }


turns into


                    foreach (String filename in filenames){
                       int testvar = 1;
                    }

Temporarily disabling resharper fixed the problem .  But i cant say for sure that resharper7 is to blame.
Im using visual studio 2012 on windows 7 pro 64bit machine.
I also had "codemaid" extension extension installed on it aswell.

However , the bug is not easily repeatable.
Sometimes without disabling any plugins, a mere restart of visual studio fixes the problem.
And it doesnt happen again for a while until it just* wants to.

0
Comment actions Permalink

Did you fix this problem I have the same problme in VS 2013 and Resharper 8 ?

0
Comment actions Permalink

I can confirm the issue with VS 2013 and ReSharper 8.

0
Comment actions Permalink

Still happens in 8.2.1000.4556

0
Comment actions Permalink

Hello Guys,

  It seems as if you experience the same issue as described here http://youtrack.jetbrains.com/issue/RSRP-402877. You are welcome to comment and vote for it.

Thanks!

0
Comment actions Permalink

I had the same problem. I use this prebuilt script to overcome the problem.

break>$(ProjectDir)\Properties\licenses.licx
0

Please sign in to leave a comment.