Category : .net-core

I have .NET 5 app, but a lot of project dependencies are still in .NET Framework 4.7.2 world… I need to dockerize this app (for Windows Containers for now – this is the first step), but copying C:Program Filesdotnet from mcr.microsoft.com/dotnet/framework/sdk:4.8 image into mcr.microsoft.com/dotnet/sdk:5.0 did not change anything and I still cannot build csproj file. ..

Read more

Is it possible to have an executable associated with two icons in such a way that the one or the other is used as the shortcut icon depending on the windows desktop background tone? <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <ApplicationIcon>app-icon-for-light-background.ico</ApplicationIcon> <!–ApplicationIcon>app-icon-for-dark-background.ico</ApplicationIcon–> </PropertyGroup> </PropertyGroup> That is to say if the user uses send to… desktop (create shortcut) shell ..

Read more

I am trying to pass bytes by reference from C# such that I can call the atomic operation InterlockedOr8 on them. I have the following static library in C++: Bitwise.h: char EightBitOr(char volatile* destination, char value); Bitwise.cpp: #include "Bitwise.h" char EightBitOr(char volatile* destination, char value) { return InterlockedOr8(destination, value); } I am calling it from ..

Read more

I have this code to detect all installed printers’ status(whether is offline) var server = new LocalPrintServer(); foreach (var item in server.GetPrintQueues()) { item.Refresh(); var printer = new Printer() { Name = item.Name, IsAvailable = item.IsOffline ? "offline" : "not offline" }; printers.Add(printer); } then I show these printers in a listview(I am sure that ..

Read more