Monday, October 17, 2011

Remove Visual Studio autogenerated control from Toolbox

If you have a project that uses a lot of visual database components, you will see that those components are auto generated and present in the toolbox causing Visual Studio to run slower. To get rid of those components go to: Tools - Options - Windows Form Designer and set AutoToolboxPopulate to false and restart Visual Studio

Make Visual Studio 2010 use more than 2GB of RAM

Tested on Windows 7 Ultimate x64:
  1. Make a backup of 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devaenv.exe'
  2. Add 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin' without quotes to PATH variable
  3. Open cmd under: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
  4. Run in cmd: 'editbin /LARGEADDRESSAWARE devenv.exe' without quotes
  5. Restart

Friday, June 3, 2011

The stub received bad data

"System.Runtime.InteropServices.COMException (0x800706F7): The stub received bad data. (Exception from HRESULT: 0x800706F7)
at Word.Find.Execute("

To work around this issue, follow these steps:

1. Click Start, click Run, type Regedit in the Open box, and then click OK.
2. Locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
3. Right-click the registry key that you located in step 2, click New, and then click Key.
4. Type OleAut, and then press ENTER.
5. Right-click OleAut, click New, and then click DWORD
6. Type DisableShield, and then press ENTER.
7. Right-click DisableShield, and then click Modify.
8. In the Value data box, type 00000001, and then click OK.
9. On the File menu, click Exit to quit Registry Editor.

Note: This workaround disables some security checks that have been implemented in the Windows Server 2003 and Windows XP operating systems. Therefore, we recommend that you use this workaround to test whether the hotfix that this article describes will resolve the problem that you are experiencing. We do not recommend that you use this workaround as a permanent resolution for this problem.

More info:
http://support.microsoft.com/kb/895321/

Thursday, January 20, 2011

ClickOnce Installation Location

Windows XP:
C:\Documents and Settings\\Local Settings\Apps

Windows Vista/Windows 7:
C:\Users\\AppData\Local\Apps