How can I get Visual Studio to use Embedded Source code whilst debugging?

I have embedded the C# source code into a portable PDB file using the `<EmbedAllSources>` element in the csproj file, and I have embedded the pdb into the assembly using the `<DebugType>embedded<Debug...

15 Nov at 12:55

Converting IConfigurationSection to IOptions

The Options pattern allowed me to create options objects containing values from configuration, as described here: [https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options](htt...

What is useState() in React?

I am currently learning hooks concept in React and trying to understand below example. ``` import { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call...

Add comments in App.config in Winform application

I'm developing a windows application with C# . I need to add some comments into Application settings ( App.config ) Here is my App.config

Service Stack Rate Limiting

I need to rate limit specific end points rather then all end points in the API application. By default, the rate limit feature enforces rate limiting to all service end points. Is there way to enable...

5 Nov at 23:39

Convert AutoQuery query string to SqlExpression

I am trying to re-create AutoQuery queries outside of a service request. I am doing this because I give user option to save a request and then use that data elsewhere. I save the query string data s...

5 Nov at 20:44

How to generate the appsettings.<EnvironmentName>.json file?

I have an ASP.NET Core 2 WebAPI which will be deployed across the following environments: INT, QA, STAGE, PRODUCTION environments. Based on the above, I need to have `appsettings.<EnvironmentName>.jso...

Could not load file or assembly 'System.Data.SqlClient, Version=4.4.0.0

First of, some context information: The platform this is running on has .Net Framework 4.7.1 installed. I have a Class Library that is in the .Net Standard 2 specification in order to support .Net C...

5 Nov at 17:28

Get scroll position with Reactjs

I use reactjs and want to handle scroll with `click` event. Firstly, I rendered list of posts with `componentDidMount`. Secondly, by `click event` on each post in list, It will display post detail a...

27 Sep at 13:43

What is compiler warning CS1723 "XML comment has cref attribute 'T' that refers to a type parameter" all about?

Given this code: ``` /// <summary> /// Implementations represent a configuration with a specific data /// type <see cref="T"/> that can be used by this application. /// </summary> internal interface ...

Why ReadOnlySpan may not be used as a type argument for generic delegates and generic methods?

I understand why `ReadOnlySpan` may not be used as a type argument for generic classes. `ReadOnlySpan` is stack only and therefore it cannot be used as field types, field members live in the heap like...

5 Nov at 14:20

Set the space between Elements in Row Flutter

Code: ``` new Container( alignment: FractionalOffset.center, child: new Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ ...

6 Dec at 12:9

Correct the classpath of your application so that it contains a single, compatible version of org.axonframework.eventsourcing.eventstore.jpa

I am working on `Spring Boot + Axon` example. Following [https://www.youtube.com/watch?v=lBKZOTe9QM4&list=PL4O1nDpoa5KTq5QKX9ueK-0QCJ-6Wm_ma](https://www.youtube.com/watch?v=lBKZOTe9QM4&list=PL4O1nDpo...

31 Dec at 07:35

DTO as array in ServiceStack

I'm attempting to migrate a Web API service to ServiceStack with minimum (no) change to the service definition, but am having trouble creating an operation with an array as the body parameter, like in...

4 Nov at 08:56

How to implement switch-case statement in Kotlin

How to implement equivalent of following Java `switch` statement code in Kotlin? ``` switch (5) { case 1: // Do code break; case 2: // Do code break; case 3: // Do cod...

30 Apr at 20:25

ServiceStack Swagger body

I'm struggling getting Swagger to present my ServiceStack service correctly. I would like to see an UserId string as a form parameter and a PrivateCustomer object as a body parameter, but keep gettin...

3 Nov at 11:27

Convert JToken To JObject

I'm trying to create an OAuth Handler in .Net Core, The api I'm using wraps the user data response in an property called data, But the OAuthTicket Context Expects a JObject and Not A JToken ``` var p...

3 Nov at 05:4

How to get current name of route in Vue?

I want to get the name of the current route of vue-router, i have a component menu with navigation to another componentes, so i want to dispaly the name of the current route. I have this: ``` created...

2 Nov at 23:8

Build Fails: `npm rebuild node-sass --force`

Using `n` to switch Node versions. I've ran `yarn`, `npm rebuild node-sass --force` many many times. And still fails. Getting this error: `Node Sass could not find a binding for your current environ...

2 Nov at 20:22

A fatal error occurred while creating a TLS client credential. The internal error state is 10013

Recently deployed a Windows 2016 Standard Server, with Active Directory and Exchange 2016. We have disabled SSL 1.0, 2.0 and 3.0 for both Server and Client, and have disabled TLS 1.0 and TLS 1.1. ...

Invalid cast from 'System.String' to 'Serilog.Core.IDestructuringPolicy'

From studying [Serilog.Sinks.AzureTableStorage](https://github.com/serilog/serilog-sinks-azuretablestorage/tree/master) I have the following In Main ``` var configuration = new ConfigurationBuilder() ...

20 Jun at 09:12

Service becomes undefined in exception handler

I have a service that injects my `AuthenticationService`. In this service I initiate a third party typescript client and register a method inside the service as the exception handler. My issue is th...

1 Nov at 20:8

How to create an illustrator/photoshop-like pentool for creating bezier curves in Unity

I need to create complex segmented bezier curves so I want update the code to create illustrator/photoshop-like pen tool bezier curves. This video shows how the [pentool behaves](https://youtu.be/H_pf...

1 Nov at 18:27

.NET Core Xunit - IActionResult' does not contain a definition for 'StatusCode'

I have an API written in .NET Core and using xUnit to test those. I have my method in API as: [HttpDelete("api/{id}")] public async Task DeleteUserId(string id) { try { //deleting from d...

Project 'ClassLibrary1.csproj' targets 'netcoreapp2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7.2'

I have two class library project with the following setting: - - Now I referenced the ClassLibrary1 project in ClassLibrary2 project. It was done successfully. But on rebuilding the project I am ge...

31 Oct at 12:41