Skip to content

Instantly share code, notes, and snippets.

View gest01's full-sized avatar
💻
debugging...

Stefan Geiger gest01

💻
debugging...
View GitHub Profile

Building a universal Windows 7/Windows 10 .NET EXE

The problem with building a .NET (classic) executable that runs on both clean Windows 7 install and on Windows 10 is that Windows 7 only ships with .NET 3.5 inbox and Windows 10 ships with .NET 4.X. A .NET 3.5 executable will not run on a (clean install) Windows 10 directly. It can be coerced to do so in multiple ways, but none of them are "worry-free single file" solutions (config file, registry settings, environment variables, etc.).

One of the solutions is to set COMPLUS_OnlyUseLatestCLR environment variable to 1 before the process starts. This will allow .NET 4.X to take over execution of the program. This still doesn't qualify as "worry-free" because we need a batch file or something else to set the envionment for us before the process start (it's too late once Main is executing).

One weird trick to run the same executable on both Windows 7 and Windows 10

When I said we need to set COMPLUS_OnlyUseLatestCLR environment variable to 1 bef

@RealDotNetDave
RealDotNetDave / .editorConfig
Last active June 20, 2024 08:27
.editorConfig by David (dotNetDave) McCarter - dotNetTips.com
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5
# Updated May 2, 2024
# dotNetDave's NEW coding standards book is available at: https://bit.ly/CodingStandards8
# Rockin' the Code World with dotNetDave (weekly live show): https://bit.ly/RockinCodeWorldShows
root = true
# All Files
[*]

Sony Bravia HTTP API

The sony bravia has a HTTP API interacted with using a Pre-Shared key. There's a more complex auth flow but I've not described it here.

There wasn't any documentation, so I've written some. If you're a TV integrator don't read this, you'll laugh. I'm probably just getting confused by UPnP.

Disclaimer: I've only tested this on my TV, which is a KDL-50W829B. Your TV might not have all of the services; see Available services section for how to discover what your TV supports.

@rafalkasa
rafalkasa / LowercaseDocumentFilter.cs
Last active December 5, 2022 19:02 — forked from smaglio81/LowercaseDocumentFilter.cs
Upgrade for Swashbuckle.AspNetCore 5.x
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic;
namespace BoundedContext.Web.Swagger
{
/// <summary>
/// This class orginally was created by https://gist.github.com/smaglio81 and modified version used in this project you can find here
/// https://gist.github.com/rafalkasa/01d5e3b265e5aa075678e0adfd54e23f