Could not load file or assembly 'System.Buffers, Version=4.0.2.0...'
I'm getting the following exception when trying to call `GetDatabase` method of the `MongoClient` class after adding a new configuration using VS config. manager: ``` Could not load file or assembly '...
- Modified
- 22 Jul at 09:33
Startup Project Option in Jetbrains Rider
I'm using Jetbrain's Rider. I have two classes in a project. They both have main methods. So I'm getting an erorr saying " Program has more than one entry point". I cannot even find the "Startup Proje...
- Modified
- 17 Jul at 08:39
ServiceStack Redis Get an struct always return default
I'm using ServiceStack Redis. I have an `struct` and I want to storage it in Redis. But when I try to get it, it always return the default value. `struct``class`. Any ideas? ``` public struct PersonSt...
- Modified
- 20 Jul at 23:20
Convert object to System.Text.Json.JsonElement
Let's say I have an object of type: ``` public class MyClass { public string Data { get; set; } } ``` And I need to convert it to System.Text.Json.JsonElement. The only way I found is: ``` var js...
- Modified
- 20 Jul at 13:57
Request body too large
When I try to upload a 80mb file from postman to my local endpoint running in Visual Studio 2019 on IISExpress I get the following error: > The request filtering module is configured to deny a request...
- Modified
- 20 Jul at 01:11
What is pyproject.toml file for?
### Background I was about to try Python package downloaded from GitHub, and realized that it did not have a `setup.py`, so I could not install it with ``` pip install -e <folder> ``` Instead, the...
- Modified
- 5 Mar at 08:10
Asp .net core - Could not load file or assembly 'ServiceStack' or one of its dependencies
The site does not start on hosting with an error Could not load file or assembly 'ServiceStack' or one of its dependencies. I use 1. ASP net core with target net core 3.1 2. ServiceStack 5.7.0 3. Hos...
- Modified
- 19 Jul at 09:12
BigInt inconsistencies in PowerShell and C#
According to [microsoft documentation](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.biginteger?redirectedfrom=MSDN&view=netcore-3.1) the `[BigInt]` datatype seems to have no defined ma...
- Modified
- 18 Nov at 18:38
How can I fix "unexpected element <queries> found in <manifest>" error?
All of a sudden, I am getting this build error in my Android project: ``` unexpected element <queries> found in <manifest> ``` How do I fix it?
- Modified
- 19 Aug at 16:46
can't find IWebHostEnvironment in Microsoft.AspNetCore.Hosting.Abstractions assembly in a .NET Core class library
I can't reference the IWebHostEnvironment element in my .NET Core class library. I have added NuGet packages and , but it still can't find the type. In the documentation, is in the Microsoft.AspNetC...
- Modified
- 16 Jul at 04:10
How to test an endpoint that has a re-direct?
I have the following endpoint I use to confirm email addresses: ``` public ConfirmEmailResponse Get(ConfirmEmail req) { var cacheItem = Cache.Get<ConfirmEmailCacheItem>(req.Token); if (cacheIt...
- Modified
- 15 Jul at 21:15
Can you use the same description in the ApiMember attribute and xmldoc summary comment?
In my API's model assembly, I heavily use the `ApiMember` attribute to provide descriptions for the properties for Swagger UI, e.g. ``` public class FindVendorItems : IReturn<List<VendorItem>>, IGet {...
- Modified
- 15 Jul at 14:54
'AddEntityFramework*' was called on the service provider, but 'UseInternalServiceProvider' wasn't called in the DbContext options configuration
I'm upgrading an ASP.NET Core application from Framework 2.2 to 3.1. It also uses Entity Framework Core. In the Startup.ConfigureServices method, there is this code: ``` services.AddEntityFrameworkNpg...
- Modified
- 15 Jul at 14:27
Set environment in integration tests
I want to set environment in my integration tests using `WebApplicationFactory`. by defualt, env is set to `Development`. Code of my web application factory looks like this: ``` public class CustomWeb...
- Modified
- 8 Apr at 12:12
PublishSingleFile does not produce a single executable
I have a .NET Core console application that i'm trying to publish as a self contained single executable. I've been able to do this in the past but to my suprise it no longer works. The project structu...
- Modified
- 6 Aug at 15:43
How to represent this structure in Redis
Let's say I'm building a cards game (I'm using an analogy as I can't disclose the original project details). Consider the following structure: ``` Dealer1 91 // Card 9 of spades (Second digit repr...
- Modified
- 15 Jul at 06:5
How do I add an Angular project to an exisiting .NET Core Web API project?
I have a basic .NET Core 3.1 Web API project that I've created with several endpoints. I now want to build a client to utilize this API. I've seen examples of projects that had Angular within their We...
- Modified
- 14 Jul at 19:23
Converting null literal or possible null value to non-nullable type
Is it possible to resolve this warning: > Converting null literal or possible null value to non-nullable type. without suppression for this C# code ``` List<PropertyInfo> sourceProperties = sourceObje...
Why does C# System.Decimal (decimal) "waste" bits?
As written in the [official docs](https://learn.microsoft.com/en-us/dotnet/api/system.decimal.getbits?view=netcore-3.1#System_Decimal_GetBits_System_Decimal_) the 128 bits of `System.Decimal` are fill...
- Modified
- 14 Jul at 17:9
How to downgrade python version from 3.8 to 3.7 (mac)
I'm using Python & okta-aws tools and in order to fetch correct credentials on aws I need to run okta-aws init. But got an error message of `Could not read roles from Okta` and the system prompted tha...
- Modified
- 14 Jul at 18:22
Get OrmLite database column name from property name
Let's say I have this class: ``` public class FooBar { public long Id {get; set;} public string BarFoo {get; set;} } ``` OrmLite when using postgresql will create table name `foo_bar` and col...
- Modified
- 14 Jul at 03:45
Running background task on demand in asp.net core 3.x
I'm trying to start a background task on demand, whenever I receive a certain request from my api end point. All the task does is sending an email, delayed by 30 seconds. So I though `BackgroundServic...
- Modified
- 16 Jul at 14:10
"dotnet tool update -g app" updates to 0.0.76 which doesn't support studio
I am trying to update app so I can use ServiceStack studio but it doesn't seem to want to update to latest version. ``` > dotnet tool update -g app Tool 'app' was reinstalled with the latest stable ve...
- Modified
- 13 Jul at 00:30
Attempted import error: 'useHistory' is not exported from 'react-router-dom'
useHistory giving this error: > Failed to compile ./src/pages/UserForm/_UserForm.js Attempted import error: 'useHistory' is not exported from 'react-router-dom'. This error occurred during the build t...
- Modified
- 12 Jul at 13:0
Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default or an integer in range 1 to 6
I'm using Visual Studio 17 (version 15.8.5), my project targets .NET Framework 4.8 and I've tried setting the C# version to use (via Build tab in the Properties window) C# 7.3 (that's the maximum vers...
- Modified
- 15 Jul at 15:28