Build failed. Again.

“Predefined type ‘System.Object’ is not defined or imported” and other System namespace stuff missing in your solution?

This article will explain how to fix an annoying situation, where Visual Studio fails to find any System types or other “basic” stuff you’re pretty sure your project should have, automagically, out-of-the-box, without you doing anything. Stuff that comes with .NET. Stuff that should just work. But life isn’t always…Continue reading “Predefined type ‘System.Object’ is not defined or imported” and other System namespace stuff missing in your solution?

Some men want to watch the build fail

How to fix “MSB4044: The AndroidSignPackage task was not given a value for the required parameter KeyPass

This article explains a quick fix to an error along the lines of “AndroidSignPackage” task was not given a value for the required parameter “KeyPass”. In my case the issue occurred in a GitHub Actions pipeline, but you could get it in Azure DevOps or even when running the build…Continue reading How to fix “MSB4044: The AndroidSignPackage task was not given a value for the required parameter KeyPass

.NET MAUI

How to fix “There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier…” after a Visual Studio update?

This article offers a stupid workaround for a cryptic and seemingly unrecoverable problem that manifests itself after a Visual Studio / .NET update and causes the following error to be thrown: “There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier ‘browser-wasm’.” Sorry, no real solution here –…Continue reading How to fix “There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier…” after a Visual Studio update?

Some men want to watch the build fail

How to kill the process causing the “MSB3021 Unable to copy file — The process cannot access the file because it is being used by another process.” error?

This time, we’re taking a look at an annoying situation where your previous debugging session, or perhaps your dotnet serve, somehow locks up your dlls or other important files that you kind of need to overwrite when rebuilding. And that, well, causes your build or debugging session to fail. So,…Continue reading How to kill the process causing the “MSB3021 Unable to copy file — The process cannot access the file because it is being used by another process.” error?

Visual Studio logo

How to fix a build configuration that’s not available as a build directive in Visual Studio?

This article describes how to fix and tweak your pre-build directives in Visual Studio – just in case they refuse to work properly. Because yeah, apparently that sometimes just randomly happens. But fear not – there’s a stupid and ugly, but definitely thoughtful workaround available! Also, sorry for the confusing…Continue reading How to fix a build configuration that’s not available as a build directive in Visual Studio?

Azure DevOps - Always Be Shipping!

Azure DevOps build fails with “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages.”

This was another peculiar one – something, that didn’t bring up too many results on Google. Always fun trying to figure out those! So, when configuring an Azure DevOps pipeline (build) for a .NET project, you might run into this annoying error: ##[error]The nuget command failed with exit code(1) and…Continue reading Azure DevOps build fails with “The nuget command failed with exit code(1) and error(Cannot determine the packages folder to restore NuGet packages.”

Mock Function call to force loading an assembly - how elegant!

New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

There’s now a new version of the assembly Microsoft.IdentityModel.Clients.ActiveDirectory available – plenty of reasons to update right away! Let me offer you one hot take on the matter since the earlier 3.x -versions of the package had some issues. Why bother updating? In an earlier post, I described an issue I…Continue reading New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

Mock Function call to force loading an assembly - how elegant!

A quick (and handy!) hack to force referenced assembly to getting copied to a project

Visual Studio failing to copy a referenced assembly to a project in build might lead to surprising runtime errors. This post will explain one method of fixing these issues, using Microsoft.IdentityModel.Clients.ActiveDirectory as the example – as earlier versions of that assembly had this issue! Problem After the build, you might get…Continue reading A quick (and handy!) hack to force referenced assembly to getting copied to a project