Sunday, 18 March 2018

VisualStudio db keep open

This can be useful for Jenkins:

cd "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE"
cmd /c "set BUILD_ID=DoNotKill && start mspdbsrv -start -spawn -shutdowntime 2147483647"

When there are running several simultaneously Visual Studio build help to avoid failed builds.
The reason when there is a running job, which finished the Jenkins will close all started process. But VS has a shared process mspdbsrv which can be used by another VS build process. In this case the second one will be a broken build.

There are another hidden environment variable that also useful:

_MSPDBSRV_ENDPOINT_ = this set up single instance for every targets. With this you can avoid oom on Jenkins build.

Tuesday, 13 March 2018

VS2015 Disable Crappy Slow Git Support


Here's how to disable the package that is responsible for loading the Git source control support in Visual Studio. Use at your own risk!
  • Create a file called devenv.pkgundef and place it next to devenv.exe in you Visual Studio's Common7\IDE (you'll need elevation for this)
  • Add the following entries to the file:
[$RootKey$\Packages\{7fe30a77-37f9-4cf2-83dd-96b207028e1b}]
[$RootKey$\SourceControlProviders\{11b8e6d7-c08b-4385-b321-321078cdd1f8}]
  • Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration
  • Start VS, and voilla - Git support no more!
To undo, delete the devenv.pkgundef file, and run devenv /updateconfiguration again.

Clear eventlogs in Windows 10 via commandline

My experience sometimes improve the performance a little bit if you clear the eventlog. You can do it with the following command in elevated mode from powershell:
$ wevtutil el | Foreach-Object {wevtutil cl “$_”}

For example this clearing fixed installed sluggish TortoiseGit.