Although I've mostly retired from software development, I'm still doing a few hours of maintenance and debugging each week for old products.
In my previous post about easing into retirement, I mentioned many examples of random idiotic wildly counterproductive things keep going wrong
and suck all enjoyment of working in IT. Idiotic things are still happening, and this post is a growing log of recent idiotic problems related
to IT and technology in general that I can show to friends and colleagues as proof of how "everything f***ing doesn't work".
March 2025 — T4 Templates in .NET Core PENDING (3 hours)
If a T4 template in a Visual Studio project attempts to "touch" a .NET Core Assembly it will fail with reference errors. This wouldn't normally happen,
but in my case I was dynamically loading an Assembly so I could reflect over it and generate code. The Assembly was recently changed from targeting
netstandard20 to net80, so I hit the problem.
"%ProgramFiles%\Microsoft Visual Studio\2022\Professional\Common7\IDE\TextTransformCore" MyTemplate.tt ‑r bin\Debug\net8.0\MyAssembly.dll
I pray that they will integrate the new T4 tool into the VS IDE and build processing soon, but I'm worried that Microsoft will put more effort into urging people to use Rosyln Source Generators instead. As I say in my C# Compiler Source Generators post a few years ago, writing generators is fragile, tedious and complicated compared to knocking-out a .tt file.
March 2025 — Publish Blazor App SOLVED (4 hours)
I need to publish a Blazor app with small changes to match those in a web service it calls. The project fails to compile due to a missing project.assets.json file.
An hour of web searching for a fix produces a dozen suggestions that are either nonsensical or have no effect. Cleaning folders, restoring packages and workloads, etc,
nothing works (and some ran for 20 minutes). It looks like some net60 environment change in my work PC has broken the build process.
Out of desperation I upgrade from net60 to net80 and update all the packages and publish settings to match. Now it compiles and runs, but publishing still fails.
I eventually see a clue: the following workloads must be installed: wasm-tools-net8.
I run the command dotnet workload install wasm-tools-net8 and restart Visual Studio, now it publishes.
March 2025 — Update Chrome SOLVED (1.5 hours)
I try to install Adblock Plus in Chrome on my work PC and it says that Chome is too old. I attempt to update Chrome and it fails with some hex code ending in 2.
The update is repeated a few times with several elevation prompts (which seem to work), but the error is unchanged. I login as local Administrator, which for some
reason causes 2 minute pauses between logoff and logon. Update continues to fail. I download the Chrome installer and run it, and the update seems to work, with only
one elevation prompt. I restart Chrome and it requests another update, which luckily this time downloads and installs without error. I log back on as my regular user
(after a 2 minute stall black screen) and start Chrome and my home page fails to load because all the network shares are dead. I reboot and now Chrome seems to be updated and working normally.
Now I can install Adblock Plus, which also removes the garish ads plastered by default all over popular news web sites.
March 2025 — PC Speakers fault FAILED (1 hour)
The small Logi z213 speakers on my wife's PC
stop working. After an hour of experiments I determine that the wire inside the sealed plastic on the stereo jack is loose, as wiggling it around causes the sound to
stop and start. The right speaker is stuck on half volume. This is a classic case of an SPF, a Single (Stupid) Point of Failure that can't be repaired and it
renders the whole device practically useless. The $70 speakers only lasted about one year.
February 2025 — Visual Studio 2022 Licensing SOLVED (5 hours)
Azure Storage Explorer was telling me that some accounts needed reauthentication, which I did and it seemed to work.
About an hour later I launch Visual Studio 2022 and it tells me that my trial period has expired. I spend an hour entering my usual credentials
over and over and over, but the problem remains unchanged. I notice that the account dialog says: This product is licensed to: wrong address.
For another hour I search for how to change the license address, or cancel it, or do anything useful. The next day, with a fresh mind I bumble into a fix by
changing the Account Options > combo Windows authentication broker to Embedded web browser, relaunching VS, entering my credentials again, which causes
everything to come good and the Accounts screen is sensible and shows no alerts. I then revert the combo and relaunch VS, which causes more authentication
prompts, but they are also finally satisfied and all problems are solved with the original settings restored. By looking at some files in
%TEMP%\servicehub\logs I see Could not find a WAM account message which lead to
This Community Issue
which is solved using exactly the same workaround that I used by dumb luck.
February 2025 — Dynamic C# Source Compile SOLVED (3 hours)
in July 2014 I posted an article titled Dynamic C# code compilation
where I use the CSharpCodeProvider class to compile C# source code at runtime, then invoke a method inside the generated Assembly.
Unfortunately that technique only works in the full .NET Framework and is deprecated in .NET Core. I went looking for modern equivalent code so I
could udpate the post. After two hours of searching I found several samples that all did not work for various reasons, even the MSDN sample code produced
a PlatformNotSupportedException, and the docs confusingly confirmed that was expected for .NET Core 2+. I eventually found some (non working) sample code
that used the CSharpCompilation and related classes, which I tweaked and almost worked. It produced compile errors like
Predefined type 'System.Object' is not defined or imported
because the basic references were not found. I eventually found the minimum required references to make the compile work. For more information see
Dynamic C# Code Compilation.
January 2025 — PC Sound Problems SOLVED (2 hours)
Playback through the line-out stops working and only the speakers in the screen work. All sound recording stops because Audacity says
there are no input devices. After an hour of inspecting Windows settings and cables I discover that the power cable and another have been pulled
out of the small mixer out of sight behind my screen. I think a cat got stuck behind my desk and got tangled in the cables trying to get out.
I put all the cables back and reboot. Playback now works, but not recording.
I stuff around with more settings in Windows and Audacity and after more than an hour of random stuffing around the recording device is visible
and I can select it and recording works again.
January 2025 — TV Sound Problems PENDING (2 hours)
Our LG 55" TV only has two ways of playing sound: (1) HDMI-ARC which is typically used with a sound bar or similar (2) Optical out plug.
We don't own a HDMI-ARC compatible playback device, just a $99 set of 5 speakers which have worked pleasantly for over 20 years using their
ancient RCA plugs. Luckily, the cheap speakers have an optical input, but connecting it to the TV's optical out produces no sound.
I have no way of determining which part is failing. We have no choice but to eventually buy a sound bar or something similar, but they
cost anything from $200 to $2000 and it's just a burden of brainpower and money to choose something.
January 2025 — .NET 9 Upgrade SOLVED (3 hours)
Since .NET 9 had been out for a few months, I decided to bulk upgrade my main hobby suite named Hoarder
from .NET 8 to 9. I did this purely as an academic exercise to keep up with the latest versions of everything and play with them. The upgrade wizard went through
all 10 projects (including a Blazor one) and produced only a few low-level warning messages. The solution compiled okay first time. At runtime everything was working
until I got to the WPF desktop program which died with an incomprehensible Exception deep inside the CodePage loading library. There were no matching results from
web searches and I fiddled around for ages without success. I had run out of ideas and give-up in disgust. Six weeks later I revisited the problem, hit run on
the WPF program and it ran perfectly. I don't know what was wrong and I don't know what went right.