Hi, I'm Hannes

Sailing on the seven seas of software development

NuGet and debugging through source code with the Source Link

If you're using your own NuGet packages or consuming 3rd party ones, then you've probably faced the pain of stepping (or rather not stepping) through it's source code.

Forget the symbol and source servers, there's a new and friendlier kid on the block: Source Link. Formerly you had to upload your symbol (PDB) and source files to different locations and use several switches during the build. Even that didn't guarantee you success, downloading source files often failed miserably.

Source Link is here to ease your pain, it is a developer productivity feature that allows unique information about an assembly's original source code to be embedded in its PDB during compilation.


Simple ELMAH-like web error logging for ASP.NET Core using MongoDB

ELMAH-like web error logging for ASP.NET Core
While making this blog I needed a quick way to log failed requests for later analysis. If you've developed ASP.NET applications in the past, then you've probably used good old ELMAH package, which automagically logs your unsuccessful requests. Good news, this is easily achievable in ASP.NET Core via something called middleware. If you're not familiar with middleware then I suggest you go and take a few minutes with the article.


Retry PowerShell Invoke-WebRequest

Fetching resources over the network isn’t always reliable. Timeouts and other connections issues are quite common, especially if the server is under stress. If you’re okay with the resource being temporarily unavailable, feel free to use the following retry script:


TeamCity Building NuGet Packages

NuGet and TeamCity

Opening and building large Visual Studio solutions is a pain. A good way to put less stress on your rig is to start moving rarely changing parts of your code into NuGet packages. NuGet has been around already since 2010, tools are mature and battletested. NuGetizing some of your system makes parts of your code always prebuilt and tested (you are using tests right?). Offloading some of the building and tests will make your overall CI (Continuous Integration) process faster as well.