TFS 2017 Removing orphaned workspace with pending changes

After we migrated our TFS 2010 installation to latest TFS 2017 it turned out that there are some conflicts with the workspaces. Here is a simple solution how to handle such problems. The conflicts was mostly due to the facts that together with TFS migration we also created new account for all contributors. Old accounts were abandoned but the glorious TFS version control still h…

By Mirek on (tags: TF, TFS 2017, categories: tools, infrastructure)

Replace all magic string with just one regex

Today I am going to show you how to use a regular expression with back reference matching to quickly replace all occurrences of magic strings to strong type names. In my WPF project I had a method which was connected to the INotifyPropertyChanged interface and notified the WPF binder whenever a property on my model was changed. This method took as a parameter the name of the pr…

By Mirek on (tags: INotifyPropertyChanged, nameof, regex, visual studio, categories: tools)

Signing ClickOnce with password protected PFX certificate

This time I had to find out how to make the TFS build step use a PFX certificate file to sign the ClickOnce manifest. It turned out to be quite a tricky task though. But let me first describe the situation. Normally when you want to sign the ClickOnce manifests you need to go the the project properties in Visual Studio and in Signing tab provide an appropriate certificate The c…

By Mirek on (tags: certificate, ClickOnce, deployment, Mage.exe, tfs, categories: tools, infrastructure)

WPF app crashes after migration to TFS 2017

Recently we’ve migrated our projects repository from TFS 2010 to TFS 2017. Unfortunately it soon turned out that WPF projects doesn’t cooperate with new TFS. Well, actually they did cooperate well with TFS but didn’t cooperate with the User. The build process went well with no warnings and the application was properly deployed. However after the app was deployed and we wanted t…

By Mirek on (tags: AssemblyVersion, msbuild, resource dictionary, TFS 2017, WPF, XAML, categories: architecture, tools)

Upload custom build task after TFS 2017 Update 1

Over a year ago I’ve posted a guide on how to upload a custom build task to Team Foundation Server 2015. The solution was based on a TFS REST api which allowed to manipulate build tasks easily. Things have changed since then unfortunately… Now in TFS 2017 after Update 1 this option is not available any more. The REST API is still there and you can get the json definition of the…

By Mirek on (tags: build, tfs, vNext, categories: tools, infrastructure)

TFS 2017 copy build definition template between team projects

Over a year ago I’ve presented a solution to copy build definitions between team projects in new Team Foundation Server 2015. That was a workaround for missing functionality in TFS, so there was no standard way to save the build definition as a template and reuse it outside the scope of current team project. Well, in TFS 2017 it hasn’t change yet… There is still no way to reuse…

By Mirek on (tags: build definition, Powershell, tfs, vNext, VSO, categories: tools, infrastructure)

Does it make sense to NGen – compile your ASP.NET MVC application ?

In .Net world every line of code has to be compiled before it can be executed obviously. However the compilation process occurs twice. First the Common Intermediate Language (CIL) is produced out of human readable code and it occurs just after the development process. Then the CIL is compiled into the native code specifically to be interpreted  by the target machine. The l…

By Mirek on (tags: NGen CIL JIT-compilation, categories: architecture, tools)

The dotnet Tool

In recently released .NET Core RC 2 there is possibility to use new tool. It exposes a set of commands , such us: creating empty projects restoring packages building your project unit testing .NET Core contains much more tooling but most of them are exposed thought tool. There is also no problem with extend set of commands. It has simple extensibility model – you can read more …

By Dawid on (tags: core, dotnet, .net, rc2, categories: tools, code)

Avoid double login in Windows 10 with Bitlocker

I am using Microsoft Windows 10 on my PC and to encrypt my disk I enabled the Bitlocker on it. Bitlocker is awesome. It works seamlessly encrypts and decrypts data on the fly. Unfortunately my PC doesn’t have the TPM module and I was forced to use a password prompt at computer start to decrypt drives. And here comes the issue. Since I am using my Microsoft account to login to W…

By Mirek on (tags: BitLocker, login, Windows 10, categories: tools, security)

TFS 2015 – Setting up build agent on separate machine

Recently we’ve installed and configured the Team Foundation Server on premise infrastructure. This was described here. In this post I would like to show you how to install and configure the build agent to work on a different machine separately from the TFS server, as it turned out to be quite tricky. My way to successfully set up the build agent for TFS 2015 was basically a try…

By Mirek on (tags: build, tfs, categories: tools, infrastructure)