Open documents in full XAML view

May 17th, 2011  / Author: Aftershock

To always open documents in full XAML view:

Tools>Options then Text Editor>XAML>Miscellaneous and select “Always open documents in full XAML view”

Turn off Automatic code collapse in VS 2010 for C#

April 13th, 2011  / Author: Aftershock

Outlining is the feature that collapses code into programmer defined regions, to turn it off go to:

Tools/Options/Text Editor/C#/Advanced

Clear the checkbox “Enter outlining mode when files open”

Reset VS 2010 Settings

April 13th, 2011  / Author: Aftershock

To reset the Visual Studio 2010 setting use the Visual Studio Command Prompt to run the following commands:

 

devenv /resetuserdata

devenv /resetsettings

Choose Items… in Visual Studio 2008 causes crash

August 30th, 2010  / Author: Aftershock

When I try to add items to the toolbox using the Choose Items option VS crashes.

 

To fix the problem I had to run the following commands from the Command Prompt:

  • devenv /setup
  • devenv /resetuserdata
  • devenv /resetsettings CSharp

How to create space on a full disk

May 17th, 2010  / Author: Aftershock

The WER ReportQueue can be taking a ton of space that can be freed up.  In Windows 2008 Server browse to c:\programdata\microsoft\windows\wer\reportqueue

Delete this directory, freed up over 8 GIG on my box.

 

Next to turn this reproting off  do the following:

  • Control Panel
  • Problem Reports and Solutions
  • Change Settings
  • Advanced Settings
  • Disable Windows Error Reporting

Convert string to DateTime

January 4th, 2010  / Author: Aftershock

The line below will convert the string into a DateTime in C#:

 

DateTime startDate = DateTime.Parse( “01/01/2009″); 

 

Virtual PC Shortcuts

November 11th, 2009  / Author: Aftershock

All of these keys use the right Alt key:

  • Alt + Delete - Ctrl + Alt + Delete
  • Alt + Enter - Toggles between full-screen and window mode
  • Alt + R - Resets the virtual machine
  • Alt + F4 - Closes the virtual machine
  • Alt + P - Pauses/Resumes the virtual machine
  • Alt + E - Open virtual machine settings
  • Alt + Down Arrow - Minimize the virtual machine
  • Alt + Right or Left Arrow - Toggle between virtual machines

Register and Unregister a Windows service in XP

September 10th, 2009  / Author: Aftershock

To unregister a service in XP use the following in a Visual Studio command prompt:

sc delete “ServiceName

or

 InstallUtil /u “ServiceName“  works better.

To Register a Windows service in XP:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe /i “Path to exe.exe

The process account used to run ASP.NET must have read access to the IIS metabase

July 24th, 2009  / Author: Aftershock

Usually occurs after IIS is installed after the .NET Framework. 

At a command prompt  navigate to ~\Windows.Microsoft.NET\Framework\v2.0.50727 and run the following command:

aspnet_regiis -i

Re-enable Hibernate in Vista

July 16th, 2009  / Author: Aftershock

powercfg /hibernate on

* After running Disk Cleanup the Hibernate feature will be missing run the command above to re-enable it.