Category ".net-core"

Entity Framework Core error "Column names in each table must be unique"

I have manually added the column IdCategory to my table Books, and now each time I try to run Update-Database, I get this error: fail: Microsoft.EntityFramewor

SocketCAN in dotnet core

I am writing software for the device on Linux, and which should work with the CAN interface. Ideally, I would like to work with the interface without connecting

How to connect to Cloud Firestore DB with .net core?

So far all the examples of using Google Cloud Firestore with .net show that you connect to your Firestore db by using this command: FirestoreDb db = FirestoreD

dotnet add package bootstrap gives 404 error with source nuget.org

I'm trying to add bootstrap to a new dotnet core razor app. C:\dev\core>dotnet --version 2.1.302 I created the project with the command below and have mad

Using a .net core dll with .net framework app?

I think i know the answer to this question but wanted to make sure. We are trying to dip our toe in .net core. We would like to code some of our dlls in .net co

How to mock IConfiguration.GetValue

I tried in vain to mock a top-level (not part of any section) configuration value (.NET Core's IConfiguration). For example, neither of these will work (using

Can't use AddHttpClient / IHttpClientBuilder in console app

I have some code from a web app that configures the http client to use a certificate. I relies on IHttpClientBuilder and AddHttpClient. I'd like to use the same

How to create docker image for dotnet app?

I have a dotnet project that work when i do dotnet run, i am trying to containerize that dotnet project. For that i have create the Dockerfile as below: FROM mc

Simple logging in .NET Core app on Elastic Beanstalk

I'm just starting to put some ASP.NET Core apps on Elastic Beanstalk. I want to do some simple logging initially just to track down some issues. I normally use

serilog format SourceContext for showing only assembly name

I configured my project to use Serilog for logging using dependecy injection. I use the following schema in the classes constructor: namespace FlickPopper.API

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

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.

Docker compose build error - Project file does not exist

I'm trying to create docker compose which run my ASP.NET Core app and mssql, but I'm getting an error during build. Here's my docker compose file: # Build Sta

"Could not locate MSBuild instance to register with OmniSharp" but msbuild is installed

Due to the third party system we work against, I have to use .Net 2.1, which has worked fine until recently. I develop on Fedora with latest updates and VSCode

How to SetBasePath in ConfigurationBuilder in Core 2.0

How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found this question, this from Microsoft docs, and the 2.0 docs online but

.Net Core 2.0 Process.Start throws "The specified executable is not a valid application for this OS platform"

I need to let a .reg file and a .msi file execute automatically using whatever executables these two file types associated with on user's Windows. .NET Core 2.

Why the gzipped file uploaded to the azure blob container with a custom file extension is being downloaded as .gz via the generated sas?

Here is my method on generating the SAS: private string GenerateSasBlob(BlobClient blobClient) { BlobSasBuilder sasBuilder = new Blo

System.ServiceModel not found in .NET Core project

I have a .NET Core xUnit project. I'm trying to call a WCF service from it but get the following exception: System.InvalidOperationException occurred HResul

.NET Core 6 Windows auth and Active Directory group based permissions

I am learning dotnet core 6, and making application for Intra. I need to get user data (user name and surname, and user groups) from company's Active Directory

TeamCity Build with mixed (.Net Framework + .Net Core) projects solution - Is it possible?

Context: Consider a Visual Studio 2017 solution with number of projects targeting .NET 4.6.1; In TeamCity a MSBuild Runner is used for the build - A new .Net Co