How to make a Windows Service from .NET Core 2.1/2.2
Recently I had a need to convert a .NET Core 2.1 or 2.2 console application into a Windows Service. As I didn't have a requirement to port this process to Linux, I could dispense with the multiple pla...
- Modified
- 23 Jun at 12:15
Integrating Python Poetry with Docker
Can you give me an example of a `Dockerfile` in which I can install all the packages I need from `poetry.lock` and `pyproject.toml` into my image/container from Docker?
- Modified
- 12 May at 04:39
Does "where" position in LINQ query matter when joining in-memory?
Say we are executing a LINQ query that joins two in-memory lists (so no DbSets or SQL-query generation involved) and this query also has a `where` clause. This `where` only filters on properties incl...
- Modified
- 18 Dec at 12:8
Are ValueTuples suitable as dictionary keys?
I'm thinking this could be a convenient dictionary: ``` var myDict = new Dictionary<(int, int), bool>(); ``` What would the hashes look like? What would the equivalent key type (struct) look like? ...
- Modified
- 18 Dec at 10:31
Categories are not shown in PropertyGrid for a collection<T>, when all the properties of <T> are read-only
As the title says, I noticed that the categories are not shown in a **PropertyGrid* (in its default collection editor) for a collection(Of T), when all the properties of class "T" are read-only. The ...
- Modified
- 18 Dec at 10:26
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib error running php after installing node with brew on Mac
I installed node using homebrew (Mojave), afterwards php stoped working and if I try to run `php -v` I get this error: ``` php -v dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dyli...
How can I use Microsoft.Extensions.DependencyInjection in an .NET Core console app?
I have a library that I would like to run on all platforms supported by .NET Core (Xamarin, Windows, Mac). And to do this I need to have a cross platform DI to handle the platform specific customizat...
- Modified
- 7 Nov at 17:18
Flutter/Dart: How to access a single entry in a map/object
This might be a very simple question but I am having trouble finding an answer. I have a object/map that I would not like to iterate but access a specific key/value at an index. For example: ``` var...
- Modified
- 18 Dec at 00:37
React hooks useState Array
I tried looking for resetting `useState` array values in here but could not find any references to array values. Trying to change the drop down value from initial state to allowedState values. I am u...
- Modified
- 22 Apr at 22:27
Flutter Multiline for text
All I need is my text to be multi-line. Am giving the property of `maxLines` but its still getting `RenderFlex` overflowed error to the right as the next is not going to 2nd line, ``` Align( alignmen...
- Modified
- 17 Dec at 09:14
HTTP Error 500.30 - ANCM In-Process Start Failure
I was experimenting with a new feature that comes with .NET core sdk 2.2 that is supposedly meant to improve performance by around 400%. Impressive so I tried it out on my ABP () project `Template asp...
- Modified
- 19 Jul at 21:55
Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager`
I writing code for adding roles to users in my asp.net core project Here is my Roles controller. ``` public class RolesController : Controller { RoleManager<IdentityRole> _roleManager; UserM...
- Modified
- 16 Dec at 10:16
Why is my application becoming less responsive over time?
I'm debugging a C# application that becomes almost unresponsive after a few days. The application calculates memory/CPU usage every second and displays it in the footer of the main UI. The cause for ...
- Modified
- 16 Dec at 06:11
Add `host`, `basePath` and `schemes` to swagger.json using Swashbuckle Aspnetcore
I am using official doc step by step method to configure Swagger UI and generate Swagger JSON file in my ASP.NET core API application. [Get started with Swashbuckle and ASP.NET Core](https://learn.mi...
- Modified
- 15 Dec at 13:56
Add [title] to fillable property to allow mass assignment on [App\Post]
While inserting data in Mysql I have encountered the following error: Here is my code: ``` $post = Post::create([ 'title' => $request->input('title'), 'body' => $request->input('body') ]); ``` While...
EFCore - How to have multiple navigation properties to the same type?
My model contains the classes Post and PostHistory, where Post has a one-to-many relationship with PostHistory. ``` class Post { public int Id { get; set; } public PostVersion CurrentVersion...
- Modified
- 15 Dec at 15:23
InvalidOperationException in Asp.Net MVC while using In-Memory Cache
I need to apply `In-Memory Cache` on my website with`.NetFramework 4.5.2` but I get this exception: > Unity.Exceptions.ResolutionFailedException: 'Resolution of the dependency failed, type = 'Tra...
- Modified
- 24 Sep at 10:47
How can I configure Visual Studio Code to run/debug .NET (dotnet) Core from the Windows Subsystem for Linux (WSL)?
I've installed .NET Core 2.2 in the [Windows Subsystem for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) (WSL) and created a new project. I've also installed the C# extension for V...
- Modified
- 4 Aug at 23:38
SignalR Core 2.2 CORS AllowAnyOrigin() breaking change
To connect via SignalR to an ASP.NET Core 2.1 server from any origin, we had to configure the pipeline as follows: ``` app.UseCors ( builder => builder .AllowAnyHeader () .AllowAnyMethod () ...
- Modified
- 14 Dec at 21:16
Avoiding the overhead of C# virtual calls
I have a few heavily optimized math functions that take `1-2 nanoseconds` to complete. These functions are called hundreds of millions of times per second, so call overhead is a concern, despite the a...
- Modified
- 14 Dec at 19:46
How to change Node.js version with nvm
I'm using [Yeoman](https://en.wikipedia.org/wiki/Yeoman_(software)) to create a project. When I try to use [Gulp.js](https://en.wikipedia.org/wiki/Gulp.js) I run the command `gulp serve`. An error tel...
How to cache internal service calls with Servicestack
Should it be possible to cache server responses to services calls done via Gateway.Send() from within another service? I've seen you comments stating that if I enable caching with [CacheResponse] att...
- Modified
- 14 Dec at 16:44
Dotnet Core Multiple Startup Classes with In-Process Hosting
I have a dotnet core v.2.1 application that utilizes the "startup-class-by-environment-name-convention" to use different `Startup` classes for different environment, e.g. development, staging and prod...
- Modified
- 18 Dec at 10:51
AssemblyVersion using * fails with error "wildcards, which are not compatible with determinism?"
I can't use `*` in assembly version; when I do I get the following compilation error: > The specified version string contains wildcards, which are not compatible with determinism. Either remove wildca...
- Modified
- 20 Jan at 21:48
ServiceStack Trying to create my own OpenIdOAuthProvider but VS 2017 says assembly 5.0.0.0 missing
Trying to create my own custom OpenId Auth provider, which will point to an IdentityServer service, but can't seem to find OpenIdOAuthProvider in the ServiceStack assembly. VS 2017 says Error CS00...
- Modified
- 14 Dec at 10:30