Posts

Showing posts from 2016

Restoring file history in TFS

If for some reason during merge, rename or move you lost history in TFS don't turn upset. There is still an easy way to restore history. The below call will merge only history and will not modify the contents of the files. call tf merge /version:295449 /baseless /recursive /discard "$/MyProject/SourceBranch" "$/MyProject/TargetBranch"

Visual Studio incremental build issue. FastUpToDateCheck doesn't monitor XML Documentation files.

I've found a bug in fast up-to-date check and decided to report it to authors. I hope it will influence Visual Studio team and they will revisit U2DCheck design and provide some level of extensibility to developers. https://connect.microsoft.com/VisualStudio/feedback/details/2468519

Demystifying fast up-to-date check in Visual Studio C# projects

Fast up-to-date check was created in an attempt to mitigate performance issues with incremental builds in MSBUILD. Indeed if you have many projects it would take considerable amount of time to evaluate each of them and check timestamps on all input and output files. Instead Microsoft decided to implement a simplified version of these checks that would run faster without involving MSBUILD engine. As a result this "feature" only works with "native" targets and if you have any kind of customization where external inputs or outputs are used then you'll have "misfires" sometimes. Below is some information I was able to figure out that can help you mitigate those issues. It's based on my own investigation therefore it may be not accurate enough. At least this is the most complete description that you'll find on the web. It will help you a lot in troubleshooting if you enable up-to-date check logging. Go to HKEY_CURRENT_USER\Software\Microsoft\Visua

NPM 3 slowness. Alternative cache implementation.

NPM 3 works significantly slower than its preceding version. Bad news is that development team is not going to do anything about it. https://github.com/npm/npm/issues/8826 I've implemented an alternative cache based on junction point that works much faster. Instead of restoring each package it mirrors the whole node_modules folder from cache using junctions. This approach gave me a noticeable performance improvement. Restoring from cache happens almost instantaneously.