The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘.NET’ Category

Some winget packages that will get you x86 or x64 versions of vcredist140

Posted by jpluimers on 2024/10/15

A while ago I downloaded some internal tooling that required vcredist140.dll (and related DLLs).

From the name you cannot see if that is a 32-bit (x86) or 64-bit (x64) dependency so you often have to trial and error to figure out which one you need.

I adopted some winget package install command-lines with package IDs current at the time of writing this blog post; similar should be available at the time of publication:

Read the rest of this entry »

Posted in .NET, C++, Development, Software Development, Visual Studio 2015, Visual Studio 2017, Visual Studio 2019, Visual Studio 2022, Visual Studio and tools, Visual Studio C++ | Leave a Comment »

Downloading a file from the Windows console without first installing a command-line tool

Posted by jpluimers on 2024/10/09

Note that the below methods likely will cause security warnings if a Windows machine has been properly configured, but in most cases at least one of them works.

  1. using cURL (Widows 10 and up)
    curl --url https://speed.hetzner.de/100MB.bin --output %TEMP%\100MB.bin
  2. using [Wayback/Archive] certutil | Microsoft Docs (at least Windows 7 and up; needs UAC elevation)
    certutil.exe -urlcache -split -f https://speed.hetzner.de/100MB.bin %TEMP%\100MB.bin
  3. using PowerShell (at least Windows Vista and up)
    powershell.exe -Command (New-Object System.Net.WebClient).DownloadFile('https://speed.hetzner.de/100MB.bin','%TEMP%\100MB.bin')

I think it works for all versions of curl, certutil, and PowerShell though I did not have anything older than up-to-date Windows 7 (having PowerShell version 3) and recent to test on.

Read the rest of this entry »

Posted in *nix, *nix-tools, .NET, Batch-Files, CommandLine, cURL, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows 7, Windows 8, Windows 8.1, Windows Development, Windows Vista | Leave a Comment »

GitHub Profile Roast 🔥🔥🔥

Posted by jpluimers on 2024/09/19

Who needs AI (:

[Wayback/Archive] GitHub Profile Roast 🔥🔥🔥

Sourcecode at [Wayback/Archive] GitHub – codenoid/github-roast: Spicy GitHub Roast 🔥

Via [Wayback/Archive] Dennis Schubert: “okay, I finally found a good u…” – Mastodon

okay, I finally found a good use for an LLM. no, really.
github-roast.pages.dev
this thing is brutal

In addition, I learned about [Wayback/Archive] lokal.so · GitHub: Supercharged HTTP/TCP/UDP Tunneling Software

Read the rest of this entry »

Posted in AI and ML; Artificial Intelligence & Machine Learning, C#, C++, Development, JavaScript/ECMAScript, LLM, PHP, Python, Ruby, Rust, Scripting, Software Development | Leave a Comment »

Hopefully by now the choco client will be more resilient and informative about Chocolatey maintenance windows (and maybe even about any disruptions mentioned at status.chocolatey.org)

Posted by jpluimers on 2024/09/19

Reminder to check-out of the 2015 issue mentioned in the tweets below has been had any progress.

At the time of tweeting, choco has no notion of [Wayback/Archive] status.chocolatey.org which would be very helpful to point to in case of errors on time-outs on chocolatey server calls especially if it could interrogate and inform of maintenance windows and outages when things fail on the client side.

Read the rest of this entry »

Posted in .NET, Chocolatey, CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »

If I ever need to do OAuth: aspnet-contrib/AspNet.Security.OAuth.Providers: OAuth 2.0 social authentication providers for ASP.NET Core

Posted by jpluimers on 2024/08/21

This is cool: [Wayback/Archive] aspnet-contrib/AspNet.Security.OAuth.Providers: OAuth 2.0 social authentication providers for ASP.NET Core.

Based on ideas at [Wayback/Archive] TerribleDev/OwinOAuthProviders: OAuth providers for Owin.

Via [Wayback/Archive] David Fowler 🇧🇧🇺🇸 on Twitter: “Since we’re on the auth topic, there’s a repository maintained by @martin_costello and @kevin_chalet for interacting with pretty much every oauth provider on the planet github.com/aspnet-contrib/AspNet.Security.OAuth.Providers… #dotnet #aspnetcore”.

OAuth 2.0 providers covered at the time of writing are in the [Wayback/Archive] AspNet.Security.OAuth.Providers/README.md: Providers at dev · aspnet-contrib/AspNet.Security.OAuth.Providers.

–jeroen

Posted in .NET, .NET Core, Authentication, C#, Development, OAuth, Power User, Security, Software Development | Leave a Comment »

David Fowler on Twitter: “Playing around with using static interface methods and the new IParsable to make generic callsites for HTTP APIs. Before .NET 7 there was no way to write generic code that did {Type}.TryParse/{Type}.Parse. The type system didn’t have a way to describe these contracts. #dotnet”

Posted by jpluimers on 2024/07/25

Reminder to check out this [Wayback/Archive] David Fowler on Twitter: “Playing around with using static interface methods and the new IParsable to make generic callsites for HTTP APIs. Before .NET 7 there was no way to write generic code that did {Type}.TryParse/{Type}.Parse. The type system didn’t have a way to describe these contracts. #dotnet” (and OCR the images):

Read the rest of this entry »

Posted in .NET, .NET Core, C#, C# 11, Development, Software Development | Leave a Comment »

Interesting thread on the usefulness of running a syslog server and being able to write to it

Posted by jpluimers on 2024/07/04

For my link archive:

  1. [Wayback/Archive] jilles.com 🔜 MCH2022 🏳️‍🌈 on Twitter: “My Ubiquity setup stopped working (again). This happens way to often in my opinion. I have setup a monitoring environment to debug the issues and consider it not reliable enough for the amount of money I spend on it.”

  2. [Wayback/Archive] Rick on Twitter: “@jilles_com Waar heb je problemen mee? En ik tijdelijk een syslog server draaien. Dan je kun je gemakkelijker de logs doorspitten (kiwi heeft een simpele gratis versie)”
  3. [Wayback/Archive] jilles.com on Twitter: “@RickvanSoest Ik draai een grafana setup met syslog, snmp ingest en een losse traceroute om uit te sluiten of het aan de provider of de hardware ligt.”
  4. [Wayback/Archive] jilles.com on Twitter: “@RickvanSoest Software upgrades die falen. In dit geval een PoE switch die op z’n gat lag. In dit geval iets dat met een reboot gefixt is. Maar in geval van de upgrade was het een compleet nieuwe configuratie.”

In todays cross-platform world, it pays if your tooling can send logging to syslog.

Though originating from the CP/M and SunOS background, I have done most of my professional development work in Windows back-ends and front-ends, so here are some links relevant to that:

--jeroen

Posted in .NET, C#, Delphi, Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | 2 Comments »

In potentially multi-threaded .NET Console applications, ensure `Console.EnsureInitialized` gets called for at least output, and potentially for input

Posted by jpluimers on 2024/07/02

An interesting issue at [Wayback/Archive] Khalid ⚡️: “I just used #JetBrainsRider to find a deadlock scenario in #dotnet that I would not have guessed would deadlock. The Console needs to be initialized since the initialization uses a lock the first time. Using it in parallel tasks causes deadlocks. #dotnet This is excellent tooling!…” – Mastodon.

https://i0.wp.com/web.archive.org/web/20240626133154if_/https%3A//files.mastodon.social/media_attachments/files/112/683/097/702/613/855/original/3c11b46a77d3a1fd.png

[Wayback/Archive] 3c11b46a77d3a1fd.png (2800×1610)

It boils down to a non-public Console.EnsureInitialized method being called from multiple threads causes deadlocks. So far, it looks it can only be called as part of referring to Console.In or Console.Out.

I could only find one potentially related bug, which is [Wayback/Archive] NativeRuntimeEventSource behaving poorly in conjunction with other providers · Issue #88011 · dotnet/runtime · GitHub and being worked on, for .NET 9 or later:

Read the rest of this entry »

Posted in .NET, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »

GitHub – KirillOsenkov/LargeAddressAware: A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE (and some words on a 64-bit Delphi product)

Posted by jpluimers on 2024/06/26

[Wayback/Archive] GitHub – KirillOsenkov/LargeAddressAware: A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE

Hopefully this can be applied to Delphi projects as well. If not then in Delphi you can manually call this in an post-build task.

Addition late 20240626

[Wayback/Archive] Kirill Osenkov: “@wiert I also found that you can…” – Mastodon

@wiert I also found that you can target AnyCPU 32-bit preferred and it will give you the same address space. So that tool is only for x86.

Via [Wayback/Archive] Meik Tranel on X: “Please for the love of all that is holy. Do not build #dotnet tools to serve a non interactive task that is supposed to be run during a build – use an #MSBuild task package. Also #JS/#NPM devs should not be allowed to write tooling. Thanks for coming to my ted talk…”.

The Delphi bit inspired a few months ago by: [Wayback/Archive] Andreas on X: “Will there ever be a 64bit Delphi IDE or at least a LargeAddressAware version. Our Projekt crashes the IDE between 14-18 compilations because it runs out of memory. Maybe I have to patch the IDE myself by moving all .NET and Compiler memory allocations above the 2 GB address.”

Read the rest of this entry »

Posted in .NET, Conference Topics, Conferences, Continuous Integration, Delphi, Development, Event, msbuild, Software Development | Leave a Comment »

delphi – What is the meaning of the bScan parameter value 0x45 in keybd_event? – Stack Overflow

Posted by jpluimers on 2024/06/06

From a long time go and a project that got cancelled, but maybe in the future I will need a similar thing again: back in the days not all raw key codes were readily documented or converted correctly from winuser.h to other environments (0x45 is the keyboard raw scan code value for VK_NUMLOCK of the Num Lock key).

[Wayback/Archive] delphi – What is the meaning of the bScan parameter value 0x45 in keybd_event? – Stack Overflow (thanks [Wayback/Archive] David Heffernan and [Wayback/Archive] kludg):

Read the rest of this entry »

Posted in .NET, Conference Topics, Conferences, Delphi, Development, Event, Software Development, Windows Development | Tagged: | Leave a Comment »