Showing posts with label vs2008. Show all posts
Showing posts with label vs2008. Show all posts

Using Beyond Compare with visual studio

Beyond Compare is the best merge and compare tool I’ve ever had the pleasure of using but I have found the experience of integrating it with visual studio can depend greatly on using the right parameters.
Using a different merge/compare tool with visual studio is a fairly straight forward thing to do but if you’re using something like winmerge but beyond compare has a lot more bells and whistles to fiddle with. Below is my preferred setup.

How To:

Under Tools > Options > Source Control > Visual Studio Team Foundation Server



Select Configure User Tools. Add both Compare and Merge operations.



Beyond Compare
Compare:
   Tool: C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
   Arguments: %1 %2 /title1=%6 /title2=%7 /solo
Merge:
   Tool: C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
   Arguments: %1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9 /solo


The Microsoft Visual Studio Remote Debugging Monitor has been closed on the remote machine.

I was having an annoying problem with vs2008 where when I tried to debug I would sometimes get this error message:


"Error while trying to run project: Unable to start debugging.

The Microsoft Visual Studio Remote Debugging Monitor has been closed on the remote machine."
But I wasn't remote debugging! It turned out the reason this is happening is because visual studio is a 32 bit application but I'm running a 64 bit OS. When I hit F5 I'm launching a 64 bit application so for visual studio to debug it it has to silently start remote debug to bridge the gap.

The fix: The most reliable way to get around this I've found is to set your startup projects platform to "x86" in the project settings. This removes the need for visual studio to silently do remote debugging.

Visual Studio Hanging

Do get lots of hangs in Visual Studio where the window fails to redraw when scrolling, some windows don’t paint – and then VS finally hangs. It appears this is because you are hitting the default 10,000 GDI object per process limit. This seems to happen to me quiet often when viewing xaml files (in vs2008).

You can see the GDI Object count in Process Explorer or if Task Manager - by clicking on the view -> select columns menu and ticking GDI Objects.

You can't fix this as far as I know but you can delay the inevitable by increasing the limit.

See this link for information on how to change the GDIProcessHandleQuota limit in the registry: http://msdn.microsoft.com/en-us/library/ms724291(VS.85).aspx

I set the limit to 15,000 on my windows 7 64 bit desktop with 4 gig of ram and haven't had any issues.

For more detailed information on GDI Objects see this page: http://blogs.technet.com/markrussinovich/archive/2010/03/31/3322423.aspx

Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed

I was getting a really annoying error today, visual studio (vs2008) kept claiming "Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed". No didn't change anything though I swore after the 10th time. The code was compiling and running fine - I only got the error when I had a breakpoint set - without the breakpoint everything was hunky-doory.

Reading this connect bug http://connect.microsoft.com/VisualStudio/feedback/details/400456/edit-and-continue-preventing-execution-at-breakpoint-when-no-code-changes-were-made-in-vs2008 it looks like my issue was that I had silverlight and regular wpf/c# code in the same solution (different projects but some shared linked files with conditional #if SILVERLIGHT precompiler directives) and visual studio was somehow confusing the two.

Unloading the silverlight projects fixed the issue. The suggested work around on the connect site was to turn off edit and continue - that worked too.