This was a fun one! Suddenly, while running or debugging my ASP.NET Core 3.1 application, I started getting errors about missing assemblies, along the lines of “FileNotFoundException: Could not load file or assembly Microsoft.AspNetCore.Components.Forms”. These DLL files were not required a minute earlier – nor did requiring them really make…Continue reading Fixing unexpected Microsoft.AspNetCore package errors after a dependency update
Sometimes you’ll need the default identity for your ASP.NET Core application, but want to disable the registration of new users. Sounds pretty basic, right? However, there’s actually no easy switch you can just flip to enable or disable said functionality. I went through a lot of different articles and ideas…Continue reading How to disable “Register” action in ASP.NET Core?
Every now and then comes the need to write your console output to a log file. There’s a simple way to do this in .NET Framework, and quite a few online articles detailing a borderline one-liner on how to do achieve it: Adding a log file listener(s) by calling Debug.Listeners…Continue reading Adding Debug listeners to your console application fails in .NET Core
This is another, kind of a classic and simple solution to a fairly simple problem: How to fix it, when your DbContextOptionsBuilder fails to take in your connection string and complains about UseSqlServer missing or whatever? Okay – let’s take a step back. How did we end up here? So,…Continue reading How to solve ‘DbContextOptionsBuilder’ does not contain a definition for ‘UseSqlServer’ error in .NET Core?
Welp – this was not a fun issue to run into! While nobody in this day and age should use Internet Explorer for any normal usage (occasional legacy scenarios aside), there are still some luddites who do (or whose IT department makes them to). This means it’s still useful, and…Continue reading IE11 fails to load a (server-side) Blazor web app
When you’re in your .NET Core project, it’s always easy: you just register your DbContext in ConfigureServices, and then inject it into whichever Page, View or Controller you might need it in. However, when you have another project or solution you’re working on and you’d still like to use the…Continue reading How to create a DbContext from just a connection string?
I have just resolved a random issue that’s difficult enough to google so I thought it would be worth documenting! These seem to be popping up whenever you work with anything that’s fairly fresh out of the oven… This particular case revolves around Visual Studio being incredibly obnoxious and starting…Continue reading How to fix “The type or namespace name ‘Services’ does not exist in the namespace ‘Microsoft.AspNetCore.Components’ (are you missing an assembly reference?)”
Just a quick piece of documentation, as this piece of code, has changed in different versions of .NET Core 3.0 so far a few times. Need to have things like this written down somewhere! UriHelper / NavigationManager with .NET Core 3.0 Both of these helper libraries do essentially the same…Continue reading How to use UriHelper or NavigationManager in .NET Core 3.0 & Blazor?
Welp – just ran into this one, and as I expect others to encounter the same issue, I’d better document it right away! So in Blazor, I was crafting a simple component that’d display some data in a nice way. Being lazy and crafty, I thought I’d copy-paste some similar…Continue reading ‘__generated__Index.OnInitAsync()’: no suitable method found to override