Category ".net-core"

Use Serilog with Microsoft.Extensions.Logging.ILogger

I've created a .NET Core 3.1 project using a Host, the IoC container with IServiceCollection and implemented logging allover the place using the ILogger<T>

How can I enable Server GC in .NET Core?

I have a .NET Core app (MyApp.exe) developed in VS2017 running on the 1.0.4 version of the SDK. I have tried adding an App.config with the following entries: &

The required library libhostfxr.so could not be found. Netcore Linux

❯ dotnet ef A fatal error occurred. The required library libhostfxr.so could not be found. If this is a self-contained application, that library shou

The default XML namespace of the project must be the MSBuild XML namespace

I cloned the ASP.NET Core SignalR Repo locally, and try opening the solution from within the following environment. IDE Microsoft Visual Studio Enterprise 201

What is the .NET equivalent of "ProducesResponseType" from Net Core?

I have to do a "backward" from an API made with NET CORE to .NET I'm facing a problem changing [ProducesResponseType] from Net Core in a valid equivalent of .N

How to show message box on .net core Console application?

I'm developing .net core console application. I want to alert to user when want to exit application. Like below; MessageBox.Show("Contiue or not", "Question",

Problem referencing transitive dependencies when building a specific .NET Core project in TeamCity

I have a solution with multiple projects, the notable projects are: ContractProject DataProject WebProject WebProject is a .NET Core project, the other two are

Uncaught SyntaxError: Invalid regular expression [intlTelInput]

I am trying to use intl-tel-input in Asp.net core 6.0 razor pages Here is my Scripts $(document).ready(function(){ $('#tbxPhone').intlTelInput();

ASP.NET Core Web App Error: Some services are not able to be constructed

This is my first question in StackOverFlow Now, I'm using asp.net core 5.0 and I am trying to create database for Redis called Basket. But I encountered an Erro

Updating a document in Firebase Firestore from .Net Core console app

Use case Angular Firebase application that uses firestore as a form of persistence needs to communicate with a Discord Bot. I've built a synchronizer bot to me

.Net core library: How to test private methods using xUnit

The latest xunit framework does not allow test runners in library code when compiled with .Net Core framework (this is allowed for normal Visual Studio code). T

.Net core library: How to test private methods using xUnit

The latest xunit framework does not allow test runners in library code when compiled with .Net Core framework (this is allowed for normal Visual Studio code). T

How do I resolve the issue the request matched multiple endpoints in .Net Core Web Api

I notice that there are a bunch of similar questions out there about this topic. I'm getting this error when calling any of the methods below. Microsoft.A

Environment Variable for debugging in Visual Studio 2022

I have a problem in Environment Variable in Visual studio 2022. When I use Development there is no problem and it takes development AppSettings, But when I rem

How to use Bootstrap modal in Blazor client app?

I am trying to show bootstrap modal then bind its buttons. But I cannot pass the first step showing the modal. I am using Blazor client template of .net core 3.

The constraint reference 'string' could not be resolved to a type. (netcoreapp3.0)

I have got an error. This is my Startup class. public void ConfigureServices(IServiceCollection services) { services.AddControllers(); } public void Confi

Assets file project.assets.json doesn't have a target for 'net6.0-windows10.0.19041.0/win-x64'

I have a .NET 6 Windows Desktop app that I deploy with MSIX. I can run and debug it on my own computer, but it fails to build with Azure Pipelines YAML. I get t

Remove unnecessary usings with dotnet format

We have dotnet format to apply formatting to csproj or even sln file for the entire solution. I can do that using Visual Studio 2022 Quick Action Light Bulb fea

Form view designer is not working in Visual Studio 2019 with C# .NET Core 3.1 [duplicate]

When I am opening a Visual Studio project with VB.NET then the Form view designer is automatically opened, but when I open a new project

How to set json serializer settings in asp.net core 3?

json serializer settings for legacy asp.net core applications were set by adding AddMvc().AddJsonOptions(), but I don't use AddMvc() in asp.net core 3. So how c