12

I've recently updated the version of VS from 2013 to 2015. I work on WPF and obviously, I have to modify *.xaml files; every time I leave a .xaml file Visual Studio freezes for about 15-20 seconds. I cannot work like that! I've uninstalled Reshaper, but no change. I've closed even the designer process, but still - no success.

When I try to run VS without administrative rights it freezes even more (about 30 seconds). If I try to open the same solution with VS2013 it works very well.

Station details: 12 GB RAM, i7 2.5GHz, SSD, Windows 10 x64

Does anyone face the same problem? How to solve it?!

Dragos Stoica
  • 1,753
  • 1
  • 21
  • 42
  • Try to delete the `.suo` file, which should be next to your `.sln`, also `Licenses.licx` if you have any. If that doesn't help it, just open your `XAML` files using the source code editor (right click a file -> Open With... -> Souce Code (Text) Editor -> Mark as default). This should definitely speed it up – Jcl Mar 31 '16 at 10:42
  • Visual Studio is now buried under hundreds of 3rd parties, extensions, etc. (even from Microsoft). Are you sure you don't have anything fancy, beyond resharper? – Simon Mourier Aug 09 '16 at 06:22
  • No, this issue is reproducible on every machine in our office which has installed VS2015. Now I had a clean Windows 10(re-install) without any other tools...the xaml's are still freezing. Is not related to .suo or .sln files because it happens even on newly created WPF projects – Dragos Stoica Aug 09 '16 at 07:30
  • Does it happen with a project with only main window? – Jeroen Doppenberg Aug 09 '16 at 08:22
  • 1
    This is an environmental problem, the XAML designer is vulnerable because it runs as a separate process. You need to document the anti-malware product you use. If it is Avast then don't bother, uninstall it immediately. – Hans Passant Aug 09 '16 at 08:38
  • #Jeroen Dop, no, it the WPF project is basic or default it works well. After i have 2 or 3 xaml files open and I try to switch between them the problem apears. – Dragos Stoica Aug 11 '16 at 08:31
  • #Hans Passant - it may be an environmental problem, but I don't think is related to antivirus. I currently have installed only the windows defender (predefined on windows 10) – Dragos Stoica Aug 11 '16 at 08:32
  • 1
    Have you visited thist question? http://stackoverflow.com/questions/37681942/why-visual-studio-2015-freezes-crashes-hangs-on-designer-view – Jeroen Doppenberg Aug 11 '16 at 13:08
  • #Jeroe Dop, no, I haven't seen that before, but in my case the solution of the question did not work. VS stopped responding for some reason. I've restarted the PC and then worked, but with same issues on XAMLs. Maybe in other cases it will help. Thank you. – Dragos Stoica Aug 12 '16 at 06:24
  • Good luck. I've had this issue for the last 8 years. All versions of visual studio on any computer do this. uncheck Tools -> Options -> Xaml Designer -> Enable XAML Designer. if you just want it to be fast and you're not intending to use the designer... which kind of beats the purpose to editing xaml visually. but ms is not fixing this thing any time soon. not within the next century anyway. – Shai UI Aug 17 '17 at 20:23

3 Answers3

3

It is not a plugin problem, VS2015 seems a little buggy to me. You can update to the latest version (Update 3), which works much better for me.

I think the problem is that VS added support for many different frameworks in a short amount of time. It's normal that the version is buggy, but I'm sure they will solve it with the updates.

soydachi
  • 851
  • 1
  • 9
  • 24
  • I have update 3 for a while. At start it seemed that the problem was somehow fixed, but no, I have currently a delay of 4-5 seconds on every .xaml switch – Dragos Stoica Aug 11 '16 at 08:28
2

If you can work without designer, try opening and editing just the source (XAML) code. Personally, I find it easier to work with XAML source and intellisense than using a VS XAML designer.

To do this,

  • right click on a XAML file
  • select Open with...
  • select Source Code (Text) editor
  • if you like this mode, click Set as Default to always open just XAML.

If you need designer later, you can open in designer mode by selecting XAML Designer or Automatic Editor Selector.

  • 1
    this helps a little bit, but the .xamls are freezing even without the designer. I wrote in the question, I've tried to disable the designer manually by closing the process, but not much of a improvement. Thanks for help – Dragos Stoica Aug 12 '16 at 06:18
-1

"was having similar issue with 2015 pro. During the simplest of changes it would take forever. What I did was go under debug\options\web forms designer\ (turned off refactoring). This solved all my issues, not there is no delay while working, only when I do a build or switch to another section or form, it will write all changes at once."

source: http://blog.geocortex.com/2007/12/07/slow-visual-studio-performance-solved/

Jeroen Doppenberg
  • 1,558
  • 1
  • 10
  • 13