Category ".net-core"

How to force rebuild with .NET Core on the Mac

In Eclipse we "clean". In Ant we "clean". How do we clean or force a rebuild with DotNet Core command on the Mac? Trying to rebuild with the simple build comman

DotNetCore 1.0 MVC how to automatically redirect to a single domain in live

I have multiple domains for a website: http://example.com http://www.example.com http://www.example.co.uk In production, I want the primary domain to be htt

Best strategy for creating a child container (or isolated scope) with Microsoft.Extensions.DependencyInjection

In my AspNetCore application, I process messages that arrive from a queue. In order to process a message, I need to resolve some services. Some of those service

ZipArchive Read From Unseekable Stream Without Buffering to Memory

Is there a way to read a zip file from a network stream without buffering it entirely in memory? I'd have liked to avoid downloading the entire file before star

Bearer error="invalid_token", error_description="The issuer is invalid"

I have a simple web api project, which looks like this: [Authorize] [Route("Get")] public ActionResult<string> SayHello() {

NLog not logging debug messages

I'm having a problem with logging Debug level messages in a .NET Core 3.1 Worker Service project. Neither my file target or console are getting Debug level mess

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0' exception when starting Stateful Service

I have created a new Service Fabric application in Visual Studio 2017 (version 15.7.1) and added a new service using the .Net Core 2.0 Stateful Service template

Azure Service Bus send message every other time

I've a c# dotnet webjob and a simple desktop app. Sending a message apperaes to work only every other time. serviceBusClient = new QueueClient(_conf

Problem Changing the value of nested ValueObject using C# 10, .NET 6 and EF Core 6

My Aggregate is like this: public class Order : AggregateRoot { private readonly List<OrderItem> _items = new(); public DateTime Date { get; set;

TeamCity doesn't pick up result of xUnit tests when testing .NET Core project

I have a small .NET Core project, where the complete build/test/deploy process is handled in a Cake script. I have a powershell script that runs the cake scrip

Entity Framework Core: load related data after object is queried

It is clear how to query an entity and include all the related data; e.g.: using (var context = new BloggingContext()) { var blogs = context.Blogs .

AutoMapper - Trying to flatten my object property to string but getting an error

I am trying to map my ProductDto to Product class. I get an error when mapping the string property in ProductDto class to a Brand property in the Product class.

C++/CLI project in C# solution usage

Maybe this header isn't decribe my problem exactly, but... I have .NET Core console app project which uses C++/CLI project written as a wrapper for native C++ c

*System.Text.Json* unable to load when VisualStudio is not installed

I have a DLL based on netcoreapp3.1. The DLL references the NuGet package Microsoft.Extensions.Configuration.Json version 5.0.0. If I deploy the DLL to another

Set configuration and options from json file for servicebuilder in test project

Hi i am trying to configure and build services in a test project. I have read and built a json file into IConfigurationRoot, and can extracts specific parts ind

Web Application build error with net6.0 framework, is already signed (NETSDK1177)

I am working on MAC and dotnet core 3.1, 5.0 and 6.0 versions are installed on my machine. I not able to build Web Application on my machine due to shared error

'Nullable object must have a value.' for List in LINQ c#

In database I have next model tblWorkItem with next field: public List<xWorkItemItemFailReason> WorkItemItemFailReasons { get; set; } When I am trying

GraphQL : Not Getting EF Related objects after implementing Types

For background, I am following the tutorial here: https://www.youtube.com/watch?v=HuN94qNwQmM . As the code is too long I am putting that in git https://github.

System.Text.Json: How do I specify a custom name for an enum value?

Using the System.Text.Json serializer capabilities in .NET Core, how can I specify a custom value for an enum value, similar to JsonPropertyName? For example:

.net core build produces localization folders

I have a web asp.net solution that is using .net core 2.0. I am building it using the command: dotnet publish MySolution.sln --configuration release --output d