Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

39 total results found

Spawning Processes into Interactive Sessions

.NET

Starting a Windows process using .NET is normally an easy thing.You call Process.Start() with a little setup, and the process runs. But, that starts a process in the same Windows session as the thread that calls Process.Start(). This, of course, doesn’t work...

windows
programming
dotnet
.net

Deploy a DotNet Service with Ansible

HowTo Ansible

The following shell command will deploy the binaries and appropriate configuration for a service, to an inventoried host: ansible-playbook deploy-service.yml \ -e "var_host=blissdev" \ -e "var_binrepo=oga-built-dev" \ -e "var_servicename=OGA.HostControl.Se...

deployment
dotnet
ansible

When Two Referenced Assemblies Have Overlapping Namespace

.NET

You will come across a problem at some point, where you will use a class, that exists in two libraries that your project references. This problem is identified by the CS0433 compiler error, “The type exists in both…”. To workaround this, without updating one...

debugging
programming
.net
dotnet

C# Equality Operator Overloading

.NET

Here’s a good example for how to implement operator for equality (==, !=, .Equals()). This is taken from the Version3 type in OGA.SharedKernel.Lib. NOTE: These overrides include method signatures for older and newer NET Framework versions. Equal / Not Equal...

dotnet
programming
.net

Net Deep Copy/Cloning

.NET

Below are some references for different methods of accomplishing deep copies of object types. NOTE: You will need to evaluate which technique is better for your use case, as there is no single solution for all. This is because of several factors: Time-co...

programming
.net
dotnet

DotNet Startup Remote Debugging Hook

HowTo

When performing remote debugging of an application or service, it may be necessary to see what is happening during early startup. Adapted from this article: I Wish I Knew About Debugger.Launch Earlier Normally. By the time you have started the remote process...

dotnet
remote-debug
deployment
debugging
programming
.net

DotNet Assembly Searching

.NET

Here are notes about the Assembly Helper classes that are part of OGA.SharedKernel.Lib and OGA.Common.Lib. Use Cases There are several use cases for searching loaded and referenced assemblies for classes and types.Here are some examples: Identify top-le...

programming
.net
dotnet

Install DotNet 6 on Ubuntu 24.04

HowTo

The process of installing DotNet on Ubuntu has evolved a bit.It was especially rocky on Ubuntu v22, where the OS package manager had conflicts with the official Microsoft packages, rendering the installation broken. But, it appears that in Ubuntu 24.04, it wo...

Linux
.net
deployment
dotnet

Jenkins Notes and Links

Jenkins

Here are links to Jenkins references. Jenkins User Manual: Jenkins User Handbook Dealing with the Jenkins System Account: Jenkins: Home Profile

infrastructure
.net
dotnet
deployment
programming
angular
angular
Jenkins
Linux

Good Article on Net Core With or Without IIS

.NET

Publishing and Running ASP.NET Core Applications with IIS - Rick Strahl's Web Log (west-wind.com)

dotnet
.net
programming

Raspberry Pi - DotNet Setup

Raspberry PI

Here’s a short article for setting up a Raspberry PI to run DotNet. Reference Articles We are following this article series: Page #1: RP #01: Setup your Raspberry Pi with Raspberry Pi OS Page 2: RP #02: Install .NET and develop your first .NET application ...

programming
.net
dotnet
RaspberryPi

NET Core Func Variables

.NET

Here are some use cases for a Func. Func as Method Callback If you want to have a lambda that you pass to a method, like a callback or completion handler, here is an example. Declare the Func, like this: Func<int, int, Task<int>> sigcallback = async (callb...

dotnet
programming
.net

Process Logging Behavior

.NET

Here’s my current conventions for logging in application processes. Logging features, here are implemented by the Logging class in OGA.Common.Lib. Logging Phases We use three distinct logging phases for an application, each with a distinct purpose. Ear...

.net
logging
programming
dotnet

Dotnet Dev on Linux

.NET

To create a new project at the current folder: dotnet new console --framework net6.0 --use-program-main To run the app: dotnet run  

programming
Linux
dotnet
.net

NET Core Error Responses

.NET

Here’s a decent mechanism for returning useful errors from a WEB API. Aside: We have a standing test API (OGA.RESTAPI_Testing.Service) that will return examples of this, here: http://192.168.1.201:4250/swagger/index.html We can compose an instance of the Pro...

dotnet
.net
programming
REST

Six Ways to Multi-Thread

.NET

Six ways to initiate tasks on another thread in .NET

programming
.net
dotnet

Return Multiple Values from Async Method

.NET

Async method cannot have Ref or an Out parameters. So, we cannot pass back data from them through typical syntax. This requires us to be a little creative. One way around this CLR limitation is to use tuples.Specifically, we can use an implicit tuple, that wi...

dotnet
.net
programming

PostGreSQL .NET DateTime Usage

PostgreSQL

.NET EF Core 6 made a breaking change to how DateTime is stored in PostGreSQL. This article explains some of it and the workaround: https://github.com/npgsql/efcore.pg/issues/2000   To enable the workaround, add this to the Configure method of your Startup....

.net
database
postgres
dotnet

C# Disposed in Derived Types

.NET

People make lots of references to Microsoft articles about how to properly handle Dispose in derived class types.But, there is literally no article on the Microsoft that actually shows this use case.So, here’s a collected method, based on a few references, tes...

programming
dotnet
.net

Consuming Services Inside Startup

.NET

During Startup.ConfigureServices During application startup, the Startup.ConfigureServices method is called to register services and configuration with DI.This method allows those services to be consumed across the application. However. During the execution ...

service
programming
dotnet
.net