Questions

Json.NET in Unity throwing 'The type or namespace `Newtonsoft` could not be found'

I used nuget to install Json.NET into my Unity project but the issue is when I launch it throws `The type or namespace 'Newtonsoft' could not be found. Are you missing a using directive or an assembly...

28 Jun at 18:56

Not calling Dispose on HttpRequestMessage and HttpResponseMessage in asp.net core

What is the best practice for calling Dispose (or not) on HttpRequestMessage and HttpResponseMessage with asp.net core? Examples: [https://github.com/aspnet/Security/blob/1.0.0/src/Microsoft.AspNetC...

3 Nov at 14:53

Update of System.IdentityModel.Tokens.Jwt causing breaking change in IdentityServer3 Client

Hopefully an easy one to resolve. Microsoft's `System.IdentityModels.Tokens.Jwt` package was updated yesterday on NuGet from `4.0.2.206211351` to `v5.0`. This is unfortunately causing a breaking chan...

28 Jun at 16:15

Get Documents folder path of current logged on user

I'm developing a C# WinForms application. This application has the ability to update if an update is available on server. It's working fine, but only for an admin user. The Application will check and...

17 Jul at 20:13

NuGet has problems with missing packages, how to restore?

When I try to compile my program I get the following error: ``` This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more i...

Get assembly executable directory

I have two applications, e.g. App1 and App2. When running normally, App1 will show its assembly executable location. But when I call App1 from App2, it returns App2's startup location. So, how do I ge...

23 Nov at 20:21

Comparing Guid with string

I'm surprised that I couldn't find an answer to this either in Google or here on SO, but what is the best way to compare a `string` to `Guid` taking into consideration case, and, if appropriate, perfo...

27 Jun at 22:10

Browser Link: Failed to invoke return value callback: TypeError: Cannot read property 'files' of null

## Background: Using `Visual Studio 2015`, `ASP.NET Core 1.0` I have created `Web Application` project. When I run application and go to `Chrome Console` I have following error: > Browser Link: F...

Is it possible to send Toast notification from console application?

Is it possible to send Toast notifications from console application using ? I know that it is possible to send Toast notifications from Windows Universal app: ``` var toast = new ToastNotification(...

How to use CSI.exe script argument

When you run csi.exe /? (with Visual Studio 2015 update 2 installed), you will get the following syntax ``` Microsoft (R) Visual C# Interactive Compiler version 1.2.0.51106 Copyright (C) Microsoft Co...

27 Jun at 18:32

Is there a way to reference const parameters in C# block comments?

In the c# block comments, I want to say that the default value for a particular parameter is a class const property. Is there a way to reference that parameter directly? I'd like to either display t...

23 May at 12:32

how to order by a dynamic column name in EntityFramework?

I am trying to get following code working , This was working fine for MSSQL , but since i changed to use mySql it is not working ``` records.Content = db.areas .Where(x => ...

Property or indexer cannot be assigned to "--" it is read only

So I'm trying to pass a local string to another form in a c# project. This is my code: Form 1: ``` ... Main frm = new Main(); frm.Passvalue = usrTxt.Text; frm.ShowDialog(); ``` Form 2 ``` ... pub...

27 Jun at 13:5

c# method override in Unity3d

In the latest weeks I played with Unity3d using c# as scripting language. I never used before c# nor Unity3d, and I'm trying to understand how methods overriding works in Unity framework. What wonders...

27 Jun at 07:59

How to add link parameter to asp tag helpers in ASP.NET Core MVC

I have a lot of experience with . Now I learn and have to pass a parameter to link in page. For example I have the following ``` [HttpGet] public ActionResult GetProduct(string id) { ViewBa...

Entity Framework Core Eager Loading Then Include on a collection

I have three Models that I want to include when performing a query. Here is the scenario. ``` public class Sale { public int Id { get; set; } public List<SaleNote> SaleNotes { get; set; ...

Change the name of headers in CSV file using CSVHelper in C#

I am using CSV Helper library to produce CSV files for the user to to populate and upload into the system. My issue is that the WriteHeader method just writes the attributes of a class with names like...

7 May at 02:15

Generate Unique Hash code based on String

I have the following two strings: ``` var string1 = "MHH2016-05-20MASTECH HOLDINGS, INC. Financialshttp://finance.yahoo.com/q/is?s=mhhEDGAR Online FinancialsHeadlines"; var string2 = "CVEO2016-06-22C...

6 May at 06:49

ServiceStack.Aws support "last evaluated key" on DynamoDB?

In DynamoDB, when limit property has been set up, DynamoDB will return a "last evaluated key" that is used for pagination (see [here](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Qu...

What is a circular dependency and how can I solve it?

## Scenario --- I have a solution on which I have (more than) 2 projects. The first project has a project reference to the second project. The second project doesn't have a reference to the f...

C# Task returning method in using block

In when an `Task` or `Task<T>` method is returned from within a `using` statement is there any risk of the cleanup not properly occurring, or is this a poor practice? What concerns are there as it pe...

Conditional compilation symbol for a .NET Core class library

I have created a .NET Core R2 class library and have some common code that I use for several different platforms. Some of the code is not valid in the .NET Core platform and so I wish to wrap it arou...

UWP, XAML - making CheckBox empty

How can I make CheckBox empty? I only need the tick. Now it takes additional empty space, like here: [](https://i.stack.imgur.com/AXUqQ.png) ``` <CheckBox Background="Aqua" Margin="0,0,0,0"/> ``` ...

Prevent visual studio from limiting the setter method to internal

Well, I use visual studio 2015 CE, update 2. One productivity hack I usually do is that I create empty model classes like: ``` public class PersonModel { } ``` and then use them in a select express...

ServiceStack.Redis: Query a subset of objects by object properties stored using redisClient.StoreAll()

I have list of POCO objects (~80k). I have tried different ways to store these objects in Redis. Refer to redisClient.StoreAll() at [http://docs.servicestack.net/redis-client/redis-client](http://doc...

26 Jun at 03:36