Category ".net-core"

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

Displaying website image testing vs. production

I am currently working on updating a .NET Core website which currently has image tags displaying from a URL like: <img src="https://page.website.com/images/

Is it possible to run a .NET Core console application silently (hide console window)?

I'm trying to automate some tasks for myself and I wrote a few .NET Core 1.0 console applications. One of them is BrowserRouter - a simple application which, ba

Unable to start process dotnet.exe

I am attempting to setup a new work space and transfer all of my projects from my old computer to the new one. However, I am getting this error when I try to r

Unable to create an object of type 'MyContext'. For the different patterns supported at design time

I have ConsoleApplication on .NET Core and also i added my DbContext to dependencies, but howewer i have an error: Unable to create an object of type 'MyCon

Azure Functions how to get a new local.settings.json?

What I have been doing for some time now when using Azure Functions is to setup a local.settings.json file with where I configure settings like, ConnectionStrin

Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing

I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After this change I see this warning message

Nearest location from JSON column

We have a directory application and every directory has many branches and many location points (latitude, longitude) The branches location are stored in the dat

Unit Testing WeakReference

It seems the following code to unit test WeakReference does not work correctly/reliably: object realObject = new object(); WeakReference weakReference = new Wea

How do I add Pulumi to my GitHub Codespaces / VSCode .NET devcontainer?

I want to develop and deploy IaC with Pulumi .NET / C# from a VS Code .devcontainer. How can I add this capability to the environment?