Category "c++sharp"

Not able to get Costura.Fody to work, keeps asking for the DLL

I have installed costura.fody into my project using nuget package. I have updated the FodyWeavers.xml file with: <Costura Unmanaged32Assemblies='dllname' U

Identity UserManager CreateAsync does not write to database

It doesn't give any errors or warnings but it doesn't insert in the database. Seems like it's only in memory. Also UserManager's FindByNameAsync can't check use

QR Scanner won't work on iOS devices (Unity)

Please let me start off by saying I have only been programming for about 2 years now. I am somewhat new to it. I am also more of an Android developer than an Ap

Avoiding allocations but without allowing default zero values for value types

Value types in C# can't have a parameterless ctor, as the default behaviour for CLR when creating an instance without parameters is to just zero all the bits. A

How to bind column header to property in ViewModel? (WPF MVVM)

I Have window that have DataContext that is bind to ViewModel object (VM1 for the example). VM1 have a lot of properties and one of them is a string that called

Docker container is not running on given port in dockerfile

I am trying to run my application on docker (Linux container). In my Dockerfile i'm exposing the port 80 Dockerfile FROM mcr.microsoft.com/dotnet/core/aspnet:3.

Project file could not be loaded, data at root level is invalid, no XML in the project

I am trying to run a hello world C# code from command line and this is the batch file. Tried searching for it but most of the questions are about the XML file r

Class cannot find another class in the same namespace

I have a C# WebApp that we are doing for a client. I have two classes in the project, defined (in separate files) as such... A general utility library: name

Multipart form doesn't receive fields

I'm trying to get a file and model to my api controller and test it by sending request from fiddler. So far I have managed to receive a file using MultipartData

How to find oaut_consumer_key in Twitter api?

I was downloading a Demo of Twitter "xAuth with .NET" from this Article link http://www.voiceoftech.com/swhitley/index.php/2010/03/twitter-xauth-with-net/ Click

Project file could not be loaded, data at root level is invalid, no XML in the project

I am trying to run a hello world C# code from command line and this is the batch file. Tried searching for it but most of the questions are about the XML file r

How to get only specific tables to create models from database with Entity Framework Core in C#

I'm using Scaffold-DbContext to create models from an existing database, but it auto pluralizes the table names and I don't want that. It also gets all the tabl

Reading the SECURITY_ENABLED flag of Group in Active Directory

I'm trying to read the SECURITY_ENABLED flag of a groups groupType property. The problem is that the value I retreive by using DirectoryEntry entry... entry.P

How to Compress JSON data in angular 4 app using gzip compression & send it to server using Http post?

I am using pako library for compression: var binaryString = pako.gzip(data); At server side (.net core) i am using middleware to decomopress the zipped stri

How to return a result from an async task?

I would like to return a string result from an async task. System.Threading.Tasks.Task.Run(async () => await audatex.UploadInvoice(assessment, fileName));

I can't see the folders I created in my project

I have been working on a project in C# in Microsoft Visual Studio 2012. Since I have a lot of C# files I decided to put them in a few folders based on their typ

Json.NET: how to remove assembly info from types in the resulting json string?

I am serializing using Json.NET, but the resulting string ends up way too long, because it includes a ton of surplus info about the assembly that I have no use

Get/Set Annotation from/in existsing PDF using itextSharp

I'm working on a project where i have to read an existing pdf using iTextSharp.PdfReader, then getAnnotations in order to insert them back in a new generated pd

.net core injecting and resolving services

I am trying my hand at .net core web api. I have created a static method for registering my controllers like this: public static class RegistrationExtensions {

How to move the cursor in a DataGridView c#

How to move the cursor in a DataGridView? No. .Selected = true; as this puts the cell in blue by default! I want the cursor to move When I click on "Add" button