Making a self contained executable for mac

I have made a .net core console app in Visual Studio. I want to package it now as an executable for both windows & mac. I added the runtime section to project.json. This is my projects.json based o...

14 Dec at 14:0

Does the C# compiler remove an if that encapsulates a debug.writeline

I have a piece of code like this: ``` if (state != "Ok") { Debug.WriteLine($"Error occured: {state}, {moreInfo}"); } ``` Does the compiler optimize this away if i make a release build? Or does...

14 Dec at 12:52

How can I tell Swashbuckle that the body content is required?

I have a WebAPI controller that accepts binary packages and stores them somewhere. As these packages can become quite large, I don't want to load them into memory by adding a byte array parameter but ...

What is the difference between Microsoft.AspNet.Identity.Core and Microsoft.AspNetCore.Identity?

I am implementing the AspNet identity in ASP.NET MVC application. But when I am going through the online materials I am quite confused about the 2 dlls `Microsoft.Aspnet.Identity.Core` and `Microsoft....

Using StackExchange.Redis client with Redis cluster

How do I tell StackExchange.Redis (v1.0.481) that it's about to connect to a Redis cluster (v3.2.6, in case it matters), and not just a standalone/replicated instance? When I use the redis-cli for exa...

How to declare a Fixed length Array in TypeScript

At the risk of demonstrating my lack of knowledge surrounding TypeScript types - I have the following question. When you make a type declaration for an array like this... ``` position: Array<number>...

21 Feb at 15:3

Vue - Deep watching an array of objects and calculating the change?

I have an array called `people` that contains objects as follows: ``` [ {id: 0, name: 'Bob', age: 27}, {id: 1, name: 'Frank', age: 32}, {id: 2, name: 'Joe', age: 38} ] ``` It can change: ...

23 Nov at 16:25

How do I get the new async semantics working in VS2017 RC?

Quoting from [Visual Studio 2017 RC Release Notes](https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes#a-idcshappvb-ac-and-visual-basic) > This release includes some proposed new lang...

Docker Repository Does Not Have a Release File on Running apt-get update on Ubuntu

I am using Ubuntu 16.10 and recently installed Docker (v1.12.4) using the Xenial build by following the instructions found [here](https://docs.docker.com/engine/installation/linux/ubuntulinux/). I hav...

14 Dec at 01:40

Which ChromeDriver version is compatible with which Chrome Browser version?

Actually I'm a bit confused. Although I read [several resources](http://www.softwaretestingmaterial.com/selenium-webdriver-script-in-chrome-browser/) about this. For having a test of using we need ...

21 Feb at 10:44

Running a single test file

Is there a way to run `ng test` for a single file instead of for the entire test suite? Ideally, I'd like to get the quickest possible feedback loop when I'm editing a file, but `karma` executes the ...

In Visual Studio when debugging C# code, can I export a List or a Dictionary in xml,csv or text format easily?

In Visual Studio when debugging C# code, can I export a `Dictionary<string,string>` in xml,csv or text format easily? I would like to export a `Dictionary<string,string>` in excel and see 2 columns o...

9 Nov at 14:57

How do I pass a table-valued parameter to Dapper in .NET Core?

I am using .NET Core and Dapper. My problem is that .NET Core doesn't have DataTables, and that's what Dapper uses for table-valued parameters (TVP). I was trying to convert a `List<T>` to a `List<Sql...

Active link with React-Router?

I'm trying out React-Router (v4) and I'm having issues starting off the Nav to have one of the `Link`'s be `active`. If I click on any of the `Link` tags, then the active stuff starts working. However...

SqlBuilder where clause for "IN" operator throws exception for comma separated

I'm adding a where clause to SqlBuilder that contains a "IN" operator and then assigning the parameter to a comma separated list of numbers. However, when select is called I get a PosgresException of ...

Assigning local functions to delegates

In C# 7.0 you can declare local functions, i.e. functions living inside another method. These local functions can access local variables of the surrounding method. Since the local variables exist only...

13 Dec at 20:22

How to resolve npm run dev missing script issues?

I am currently in the folder 'C:\Users\vignesh\Documents\Personal Projects\Full-Stack-Web-Developement' on gitbash executing the above command on gitbash gives me the following error. I am assuming...

13 Dec at 20:24

Task.Start .NET CORE Unable to load DLL combase.dll error Windows 7

We have some code that utilizes basic C# Task objects. However, when developing on a Windows 7 machine, attempting to run `Task.Start();` results in: > Exception thrown: 'System.DllNotFoundException'...

20 Jun at 09:12

Laravel Carbon subtract days from current date

I am trying to extract objects from Model "Users" whose `created_at` date has been more than . Carbon::now() ==> I want as ==> Carbon::now() - 30days ``` $users = Users::where('status_id', 'active')...

17 Jan at 12:31

HttpContext.Authentication.SignOutAsync does not delete auth cookie

According to ASP.NET Core [documentation](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/cookie) the method `HttpContext.Authentication.SignOutAsync()` must delete the authenti...

ps1 cannot be loaded because running scripts is disabled on this system

I try to run `powershell` script from c#. First i set the `ExecutionPolicy` to `Unrestricted` and the script is running now from `PowerShell ISE`. Now this is c# my code: ``` class Program { pr...

13 Dec at 09:21

Reference c# class library in my Azure Function

Is it possible to reference a c# class library in an Azure Function visual studio project? I am aware of the possibilities to reference external libraries and Nuget packages. Currently I am using sh...

13 Dec at 07:22

ASP.NET Core disable authentication in development environment

Is it possible to "disable" authentication in ASP.NET Core application without changing its logic? I have a .net website which uses an external identity server app for authentication. Anyway I would l...

7 Mar at 13:26

Get the name of the currently executing method in dotnet core

I want to get the name of the currently executing method in a dotnet core application. There are lots of examples of how to do this with regular c# eg - [Get the name of the current method](https://...

23 May at 12:26

How to mock IOptionsSnapshot instance for testing

I have class `AbClass` that get with asp.net core built-in DI instance of `IOptionsSnapshot<AbOptions>` (dynamic configuration). now I want to test this class. I'm trying to instantiate `AbClass` cla...