Use preview features & preview language in Visual Studio

How can I turn on features in Visual Studio? > The feature 'nullable reference types' is currently in Preview and "unsupported". To use Preview features, use the 'preview' language version. The pr...

23 Jun at 21:21

C# compiler throws Language Version (LangVersion) reference error "Invalid 'nullable' value: 'Enable' for C# 7.3"

I have solution with couple .NET Standard projects in all I wanted to enable c# 8 and nullable like below: ``` <PropertyGroup> <TargetFramework>netstandard2.1</TargetFramework> <LangVersion>8....

How to Style React-Icons

I am trying to figure out how to style icons that I import using [react-icons](https://react-icons.netlify.com/#/). In particular, I would like to be able to create a look similar to this: [](https:...

17 Jun at 17:44

Activate auto-complete for C# in Visual Studio 2019

I have the problem, that I get some suggestions for autocompletion (for example, I type "Cons" and I get the suggestion for "Console"), but these can't be applied with the Return-key. Normally, the s...

17 Jun at 09:28

Could not find the implementation for builder @angular-devkit/build-angular:dev-server on ng serve command

I tried to update the angular CLI following [this](https://www.npmjs.com/package/@angular/cli#updating-angular-cli), but now I can't run my app. When I try to run the command `ng serve`, it gives me t...

How to resolve .NET Core package version conflicts

I am migrating from a .NET MVC 5 Web Application to a .NET Core 2.2 Web API project along with five .NET Standard 2.0 projects all housed under one solution. I am now receiving 28 warnings (MSB3277)...

Display wait or spinner on API call

In my Blazor app I am making an API call to a back end server that could take some time. I need to display feedback to the user, a wait cursor or a "spinner" image. How is this done in Blazor? I have ...

7 Oct at 20:5

What is the behaviour of the '==' operator for a generic type value and the 'default' keyword?

Part 1 of the question: In the following code why does `value == default` compile fine but the other alternatives do not? ``` bool MyEqual<T>(T value) { T value2 = default; if (value == value...

14 Jun at 17:25

Where does ServiceStack publish vulnerability information?

If a vulnerability were to be discovered for any versions 3/4/5 and a patch were to be released - where would ServiceStack publish vulnerability information?

14 Jun at 12:28

Check that button is disabled in react-testing-library

I have a React component that generates a button whose content contains a `<span>` element like this one: ``` function Click(props) { return ( <button disable={props.disable}> ...

25 Jan at 15:49

How to validate uploaded file in ASP.Net Core

I'm using ASP.NET Core 2.2 and I'm using model binding for uploading file. This is my ``` public class UserViewModel { [Required(ErrorMessage = "Please select a file.")] [DataType(DataType...

13 Jun at 22:29

Generate JSON string from dynamic ExpandoObject

I am using C# and trying to generate a JSON string from a object. ``` dynamic reply = new System.Dynamic.ExpandoObject(); reply.name = "John"; reply.wins = 42; string json = System.Web.Helpers.Json....

13 Jun at 20:47

How to use host network for docker compose?

I want to use docker compose with the host network. I have a docker container that access a local REST api. Usually I run ``` docker run --net=host -p 18080:8080 -t -i containera ``` which can ...

13 Jun at 15:22

How to allow an empty request body for a reference type parameter?

I'm Building an .Net Core api controller, I would like to allow users to send `GET` requests with or without the `MyRequest` class as a parameter, so the calling the method with `Get(null)` for exampl...

13 Jun at 11:25

Blazor the type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)

I have setup the basic application in Blazor in Microsoft Visual Studio Community 2019 Version 16.1.3 and I have tried both of the versions of .NET Core SDK 3.0.100-preview5-011568 and SDK 3.0.100-pre...

15 Oct at 06:44

How can I "login" to git?

I need to change who git thinks I am so I can push to a different repo ( both are mine. ). Here is a [similar issue](https://stackoverflow.com/questions/13103083/how-do-i-push-to-github-under-a-diffe...

13 Jun at 04:47

ServiceStack RequestLogger only logs one service call

Lets say I have a Service that calls a bunch of other services through the Gateway.Send : ``` public class SomeService : Service { public SomeServiceResponse Any (SomeServiceRequest reque...

12 Jun at 22:14

Typescript: No index signature with a parameter of type 'string' was found on type '{ "A": string; }

I have some vanilla javascript code that takes a string input, splits the string into characters, and then matches those characters to a key on an object. ``` DNATranscriber = { "G":"C", "C":...

12 Jun at 19:9

Connection refused on API request between containers with docker compose

I'm developing a multi-container Docker application and I want a container to make an HTTP request to API of other container using Docker Compose. I'm getting Connection Refused error. Both container...

How to fix "VirtualBox Interface has active connections" error in Windows?

Windows 10 is displaying a error message when shutting down after using Docker Quickstart Terminal on Virtual Box. I tried to fix this by typing `exit` to close the terminal. How can I smoothly clo...

Why does the is-operator cause unnecessary boxing?

The [documentation](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/is#-constant-pattern) of constant pattern matching with the `is`-operator (`expr is constant`) states: >...

20 Jun at 09:12

How can I export DBeaver connection configurations?

I was hoping there is a way to export DBeaver connection configurations/properties from my old machine rather than having to go through the process of recreating each one. Does anyone know how to do ...

20 Sep at 17:16

Is injecting service into another service bad practice?

I am creating a web application that is tiered in the following way: Controller > Service > Repository So it's following a service and repository pattern. Let's say I have 2 entities `Product` and...

6 Jun at 22:18

react-testing-library why is toBeInTheDocument() not a function

Here is my code for a tooltip that toggles the CSS property `display: block` on MouseOver and on Mouse Out `display: none`. ``` it('should show and hide the message using onMouseOver and onMouseOut ev...

Add custom headers to ViewEngine response pages in ServiceStack

I am using [ServiceStack](https://www.servicestack.com) with [SharpPages](https://sharpscript.net/) to render dynamic content. For "reasons", I need to set the CORS headers `Access-Control-Allow-Orig...

11 Jun at 16:31