.Net & C#

Portable Gacutil – How to Execute It Correctly

I recently needed to investigate a DLL version incompatibility on a Windows Server. I needed the Gacutil utility to check which version of an assembly was installed in the Global Assembly Cache (GAC). The problem was that there were no development tools installed on the server. Instead of installing the complete development environment, I decided […] Read more»

.Net & C#

A Hidden Visual Studio Trick: Execute Selected Code with double Ctrl+E

Did you know that in Visual Studio you can execute just a selected piece of code without running the whole application? There’s a handy (and surprisingly little-known) shortcut for this:Select the code and press Ctrl + E and then again Ctrl + E. Read more»

.Net & C#

C# Singleton for Context

I use the context service as a singletone in the app. What do you think, is this a good way to initialize and use context the way like this (see below) is it better just to use it as disposable? See examples below and write the comments Read more»

.Net & C#

Error 1053 while trying to start the service in .Net Core8

Sharepoint Services

An application that was developed by me as a service with Net Core 8 didn’t want to start working as a Windows service. The application was created in Visual studio 2022 with a “Worker service” template. If you just start the app, it works. But I had problems to start it as a Windows Service. Read more»

.Net & C#

Problems with Datetime transform with SmartFormat for Net (C#)

SmartFormat is a is a lightweight text templating library to replace string.Format. Unlike common String.Format, with SmartFormat you can read templates from text files or another source. Here I will share the way, how I tried to write the DateTime in the format ‘dd/MM/yyyy HH:mm:ss’. It was not so obvious. Read more»

.Net & C#

5 steps of how to add and use AutoMapper in .Net Core project

AutoMapper is a simple little library which allows you to make less code for transforming objects of one class to another. It’s a must-have library for any complex project. There is a short scenario in 5 steps how to add and use AutoMapper in a new Net Core project with REST API. Read more»

.Net & C#

Flexible and simple Export to Excel for .Net

Once again I have to make Export of to Excel. And this time there are requirements to the template – colors, formatting and others. Not so long ago I implemented the export to Excel with XLSX package for React, and it was rendered at client. This solution is good but has many constraints. So, I […] Read more»

.Net & C#

Swagger error ‘Failed to load API definition’

When you execute your Web Api and at Swagger Page you can see Swagger error ‘Failed to load API definition’, you can’t really determine, where the error is. It is in one of the controllers. But do you want to check all of them? Read more»

.Net & C#

Popular Posts