Articles Tagged “.NET”
49 articles tagged “.NET”, newest first.
-
System Tray Icons and Toast Notifications in Windows Apps — NotifyIcon Pitfalls and Choosing the Right AppNotification API
A practical guide to keeping a business Windows app resident in the system tray and notifying users with toast notifications. Covers the correct use of Notif...
-
How Long Will VB6 Apps Keep Running? — Runtime Support Status and a Practical Path to .NET Migration
How long will VB6 applications keep running? This practical guide clarifies the asymmetry between the VB6 runtime support policy (still supported on Windows ...
-
Japanese Era Dates, Public Holidays, and Closing-Date Processing in Business Apps — Era-Resilient Design, JapaneseCalendar, and Business-Day Calculations in Practice
A report that must show '令和8年' in the Japanese era, business-day calculations that exclude public holidays, payment due on the last business day of the month...
-
Localizing WinForms/WPF Apps — resx, Satellite Assemblies, and Culture Switching in Practice
A practical guide to localizing Windows desktop apps, covering the difference between CurrentCulture and CurrentUICulture, how resx and satellite assemblies ...
-
CSV Is Not "Just Text": A Practical Guide to CSV Handling in C# Business Apps (Encoding, Excel Compatibility, Injection Defense)
A practical rundown of the classic failure patterns in business-app CSV I/O - hand-rolled Split(',') parsing, mojibake from BOM-less UTF-8 in Excel, lost lea...
-
Don't Wrap HttpClient in a using Block — Practical HTTP Communication in C# Business Apps (Creation Patterns, Timeouts, Retries)
Creating a new C# HttpClient with using on every request exhausts sockets, but making it static means it stops following DNS changes. This article walks thro...
-
Pinpointing "Slow" with PerfView and dotnet-trace — A Practical Introduction to .NET Performance Investigation
When a business app is "slow," "pegs the CPU," or "occasionally freezes," which tool should you reach for, and what should you look at? This article walks th...
-
An Introduction to Windows Event Log and ETW — Putting Your Business App's Logs on the OS's Standard Mechanisms
Are you relying on file logging alone for your Windows business app? Event Log and ETW are records visible on a different layer — to operations staff and OS-...
-
More Than appsettings.json — A Practical Guide to Configuration Management in Windows Business Apps (Per-Environment Settings, Secrets, and Where to Write)
A practical look at configuration management for Windows business apps: layering appsettings.json, choosing between IConfiguration and the IOptions/IOptionsS...
-
Printing and PDF Output in Windows Business Apps — Choosing Between System.Drawing.Printing, WPF, and Report Libraries
Organizes WinForms printing with PrintDocument, WPF FlowDocument/FixedDocument printing, and PDF output options into a requirement-based decision table. Cove...
-
Getting a Real Feel for the OSI Model — Dissecting a Single HTTP Request Into Its Seven Layers
Understand the OSI model through the real thing instead of rote memorization. We assemble and dissect, in C#, the Ethernet frame carrying a single HTTP GET r...
-
How to Think About Windows Session Isolation — Session 0, RDP, and Running Multiple Users Concurrently
This article untangles the concept of a Windows "session," a topic that consistently confuses Windows app developers. It covers why Session 0 isolation exist...
-
Reading Crash Dumps with WinDbg + SOS — A Practical Guide to Analysis After Collection
Explains how to actually read a collected Windows crash dump using WinDbg and the SOS extension. Covers symbol path configuration, tracking exceptions and me...
-
Preventing Multiple Instances of a Windows App — Named Mutexes and Activating the Existing Window on a Second Launch
This article organizes the classic requirement for business Windows apps — 'don't let the same app launch twice' — around a named Mutex. We cover the pitfall...
-
Safely Calling Win32 APIs from C# — A Practical P/Invoke Guide (DllImport / LibraryImport / CsWin32)
A practical rundown of what to watch for when calling Win32 APIs and native DLLs from C# via P/Invoke. Covers the differences between DllImport and LibraryIm...
-
Integrating Entra ID Authentication into WinForms/WPF Apps — A Practical Architecture with MSAL.NET and the WAM Broker
A practical, hands-on look at integrating Entra ID (formerly Azure AD) authentication into WinForms/WPF desktop apps: the public client mindset, where ROPC s...
-
Date, Time, and Timezones in Business Apps — From DateTime Pitfalls to the UTC-Storage Principle and Test Design
Timestamps drift by nine hours after a server migration; only the overseas office's dates roll back to the previous day — we trace date/time incidents back t...
-
UI Automated Testing for Windows Desktop Apps — How UI Automation Works and Building Robust Tests with FlaUI
A practical guide to UI automated testing for WinForms/WPF apps, working from how Windows UI Automation itself works (the tree, AutomationId, control pattern...
-
WPF High-DPI Support — Why It Still Blurs and Bleeds Despite Being 'Supposedly DPI-Aware,' and How to Fix It
WPF lays out UI in DIPs (1/96 inch) and is System DPI Aware from the start, but moving a window to a monitor with a different DPI blurs the whole screen, and...
-
Why EXCEL.EXE Processes Remain After C# Excel COM Automation — Reference Release Patterns and the Replacement Decision
A practical look at why EXCEL.EXE processes remain running after automating Excel from C# via Microsoft.Office.Interop.Excel, explained through COM reference...
-
High-DPI Support in WinForms — Why the UI Blurs or Breaks on 4K Monitors, and Practical Fixes
This article organizes the reasons WinForms apps blur or have broken layouts on 4K monitors and 150% scaling, starting from DPI virtualization and DPI awaren...
-
Choosing Windows Inter-Process Communication ── A Decision Table for Named Pipes / TCP / gRPC / Shared Memory / COM
How do you choose the right way for Windows applications to talk to each other? This article organizes named pipes, local TCP, gRPC, shared memory, file-base...
-
Using SQLite from C# in Business Apps — WAL Mode, Exclusive Locking, Corruption Countermeasures, and When to Reach for EF Core
A practical rundown of embedding SQLite into a business Windows app with Microsoft.Data.Sqlite: connection strings and pooling, how WAL mode works, SQLITE_BU...
-
How to Build and Operate Windows Services ── From Choosing Between Task Scheduler and Services to Turning a BackgroundService into a Windows Service
Should a background process become a Windows service, or is Task Scheduler enough? This guide organizes the practical design work for putting a service into ...
-
Is WebView2 the Right Successor to IE Mode? — The ActiveX Constraint and a Realistic Migration Design
A rundown of WebView2's basic architecture, the Evergreen vs. Fixed Version distribution strategies, the user data folder trap, how native code talks to web ...
-
How to Choose Where a Windows App Stores Local Data — A Decision Table for SQLite / JSON / Registry / Access
Where — and in what format — should a Windows desktop app store its data? This article organizes the choice between AppData and ProgramData, and the strength...
-
What Is a PDB (Program Database)? — Understanding Debug Information, Symbols, and Source Link
A PDB (Program Database) file maps compiled code back to source for debuggers. Learn what's inside, whether to ship it, and how Source Link works.
-
What Is Roslyn? Reading, Fixing, and Generating C# Code from the Compiler's Point of View
An overview of Roslyn (the .NET Compiler Platform): Syntax Trees, SemanticModel, Workspaces, Analyzers, Source Generators, and where they fit (and where to b...
-
Windows App Outsourcing and Contract Development: What to Sort Out Before You Ask
Before commissioning Windows app outsourcing or contract development, here is how to sort out existing software modification, device integration, COM/ActiveX...
-
Using Algebraic Data Types in .NET Framework / .NET — Designing States and Results with Types
How to use algebraic data types — especially sum types and discriminated unions — in .NET Framework and .NET, and what you gain: F#, C# class hierarchies, re...
-
Handling Windows Impersonation Tokens Correctly — Borrowing Privileges per Thread and Reverting Safely
A practical guide to Windows impersonation tokens — access tokens, primary tokens, thread tokens, impersonation levels, RevertToSelf, and .NET's WindowsIdent...
-
The Misconception That TCP Lets You Receive in the Same Units You Send — Designing Reception Around a Byte Stream
Assuming TCP delivers data in the same units as Send or Write leads to fragmentation, coalescing, garbled text, and broken protocols. This article lays out h...
-
Telling GC Lag from a Memory Leak in .NET — A Practical Procedure for Observing, Comparing, and Proving Memory Growth
A procedure for determining whether growing memory in a .NET application is simply waiting on garbage collection or a genuine memory leak, using dotnet-count...
-
How to Run PowerShell from C# (CSharp) and Receive the Results as Objects
How to launch PowerShell from C# and receive results as PSObject rather than strings — a practical walkthrough of the PowerShell SDK, AddCommand, AddParamete...
-
Why Windows Became What It Is Today: The Evolution of Windows Through a Developer's Eyes
A look at the changes from Windows 95 to Windows 11 — not as a visual timeline, but from a Windows application developer's perspective: compatibility, stabil...
-
What Is ClickOnce? - How It Works, How It Updates, and Where It Fits (and Doesn't) in Practice
An overview of ClickOnce, the deployment technology used for .NET Windows desktop apps - manifests, updates, the cache, signing, and which projects it suits ...
-
A Checklist for Safely Handling Child Processes in Windows Apps
How to make child processes die with the parent on Windows: Job Objects, exit propagation, stdout/stderr draining, and watchdog placement, plus a checklist.
-
Single-File Distribution of Windows Apps - Single Binaries and the Limits of OS Dependencies
When you want to ship a Windows app as a single EXE, the difference between shipping one artifact and eliminating OS dependencies matters. We work through .N...
-
Serial Communication App Pitfalls - Through Reconnection and Log Design
The serial communication app pitfalls you want to avoid in device integration and instrument control, organized from a practical perspective: framing, timeou...
-
Pre-Migration Checklist for Moving from .NET Framework to .NET
A practical checklist of what to verify before migrating from .NET Framework to .NET: project types, unsupported technologies, NuGet dependencies, SDK-style ...
-
What Is the .NET Generic Host? - The Foundation for DI, Configuration, and Logging
The .NET Generic Host in plain terms: one place for DI, config, logging, BackgroundService, and graceful shutdown. Minimal console example included.
-
What Is .NET Native AOT? - How It Differs from JIT and Trimming
How .NET Native AOT differs from JIT, ReadyToRun, and trimming, what you gain in startup and deployment, and where reflection-heavy code breaks.
-
Choosing Between .NET's Three Timers - PeriodicTimer/Timer/DispatcherTimer
Which .NET timer should you use? PeriodicTimer for async loops, Timer for ThreadPool callbacks, DispatcherTimer for WPF UI, plus a decision table and code.
-
Calling a C# Native AOT DLL from C/C++
Export C entry points from C# with Native AOT and UnmanagedCallersOnly and call them from C/C++ - project setup, string handling, and a working sample.
-
Why Use the .NET Generic Host and BackgroundService in Desktop Apps
How to use the Generic Host and BackgroundService to organize startup, periodic processing, shutdown, logging, configuration, and DI in Windows tools and res...
-
How to Handle ActiveX / OCX Today - A Keep / Wrap / Replace Decision Table
When you find ActiveX / OCX, how to choose between keeping, wrapping, and replacing it, covering 32-bit / 64-bit, registration, browser dependencies, and ven...
-
WPF/WinForms async and the UI Thread on One Sheet
After await in WPF or WinForms, which thread runs your code? Covers Dispatcher.Invoke, ConfigureAwait(false), and why .Result and .Wait() deadlock.
-
A Practical Guide to FileSystemWatcher - Handling Missed and Duplicate Events
We organize how to use FileSystemWatcher and its pitfalls - missed events, duplicate notifications, completion-detection traps, rescans, atomic claims, and i...
-
A Practical Decision Table for C# async/await - Task.Run and ConfigureAwait
We organize C# async/await best practices - I/O waits, CPU work, Task.Run, ConfigureAwait(false), and fire-and-forget - complete with a decision table.