.net-5 Questions

2

Solved

I have just updated my Visual Studio community 2019 to version 16.9.1. But I am not able to see the WSL2 profile as mentioned in this document. Also, my machine has all the Prerequisites. I have tr...
Nonfulfillment asked 12/3, 2021 at 11:29

5

I'm working on macOS Big Sur and Visual Studio .net core 5. I think the issues started after allowing Visual Studio to install updates (I wasn't expecting any issues), after a few hours dotnet comm...
Anguilla asked 21/12, 2021 at 9:40

2

Solved

I'm working on an ASP.NET Core 5.0 project which has a service that accesses an API. Based on the code below, I'd expect the HttpClient supplied to ToornamentService's constructor to contain the de...

3

I installed VS2019 with .NET5 SDK on Windows 10. Today it stops working. VS2019 cannot build any .NET project, without showing any error. I tried to run dotnet build and dotnet restore. It hangs fo...
Scribe asked 17/9, 2021 at 1:55

3

Solved

dotnet test uses trx output by default. I am using trx2junit to convert it to junit, but this complicates CI setup. Is it possible to output test report in junit format directly from dotnet test?
Amandy asked 26/3, 2022 at 8:28

3

Currently we are setting up a new project and like to use the new records introduced in C# 9. We encounter a problem with DataAnnotations inside the record (constructor) not being triggered during ...
Chukker asked 17/2, 2021 at 8:27

5

Solved

I want to create a Postgres user with the CREATE USER command and an already hashed digest for the password. After much searching, I thought it was only possible with MD5 until I found this link. I...
Enervate asked 15/7, 2021 at 19:57

3

Solved

I have a Blazor Web Assembly app on dotnet 5. I've added a Microsoft.AspNetCore.Components.Forms.InputFile control to a component. This causes a "Choose Files" button to be rendered. How ...
Faenza asked 14/4, 2021 at 19:29

4

Using System.Text.Json i can pretty print json using serialization option. var options = new JsonSerializerOptions{ WriteIndented = true }; jsonString = JsonSerializer.Serialize(typeToSerialize, op...
Scribble asked 7/1, 2021 at 22:7

6

Solved

I have this code on a Blazor Server-Side page: protected override async Task OnInitializedAsync() { try { _model = await BudgetReleaseRequestProviderService.GetMeetingById(MeetingId); var mee...
Visser asked 31/12, 2020 at 10:38

3

Solved

I'm trying to deserialize json into an object with a property of type Dictionary<string,string>. I specify the comprarer for the Dictionary as StringComparer.OrdinalIgnoreCase. Here's this cl...
Scutiform asked 28/4, 2021 at 20:47

3

Solved

After upgrading to net5 I'm getting obsoletion warning: [CS0618] 'HttpRequestMessage.Properties' is obsolete: 'Use Options instead.' however there seems to be no migration guide. I.e. there's follo...
Tenedos asked 6/7, 2021 at 12:53

3

Solved

dotnet run (on windows) causes warning CA1416: This call site is reachable on all platforms. 'WellKnownSidType.WorldSid' is only supported on: 'windows'. My program is designed to run only on wind...
Cookery asked 15/4, 2021 at 23:6

4

Solved

I'm developing an app that displays WebView2 using .Net5/WPF. I want to disable CORS. I have installed Chromium Edge Canary 86.0.607.0. In Edge, CORS could be disabled by adding the following argum...
Schrader asked 14/8, 2020 at 0:13

4

I need to achieve below requirements in WinUI 3 Desktop applications. How to get screen bounds? How to change windows cursor type in runtime? I already did this in WinUI UWP applications. For Scr...
Doublepark asked 9/2, 2021 at 16:11

12

Solved

Using .NET5 Azure function in Visual Studio 2019, I am getting the below exception from Program.cs: System.InvalidOperationException: The gRPC channel URI 'http://0' could not be parsed My Progra...
Barretter asked 21/11, 2021 at 3:49

15

I've been implementing IdentityServer4 to provide authorization for my React application. I have this working in my local dev environment, but am running into issues after deployed to IIS in Window...
Agc asked 11/12, 2021 at 3:5

3

I'm converting some old legacy VB apps from .NET framework to .NET 5, and have worked through most of the issues, however, I'm lost on these: Error BC30002 Type 'Global.Microsoft.VisualBasic.Applic...
Lynnelynnea asked 26/4, 2021 at 22:32

3

Solved

I'm trying to create a middleware to handle country code in the url. The code i have works great for removing the country code, so it's routed to the correct endpoint in the mvc pipeline. The probl...
Whaleback asked 19/5, 2021 at 8:43

4

Solved

I have a asp.net core (.net5) project that when I launch it systematically throws errors after a delay, and then closes the debug. I have the following launchSettings: { "iisSettings": {...
Matazzoni asked 3/3, 2021 at 12:16

5

Solved

I am going through C# 9 new features which will be released soon. Init-Only properties are being introduced with it. The one big limitation today is that the properties have to be mutable for objec...
Rayon asked 14/6, 2020 at 12:19

1

I have a .NET API with a few Worker Services that I deploy on a CentOS 8 server. I know that there is a function in Microsoft.Extensions.Hosting package that is called UseSystemd(), which is suppos...
Selfdefense asked 2/6, 2022 at 16:46

2

Solved

I want to use gRPC with .NET in an asp.net core web application. How do I generate the necessary .proto file from an existing C# class and model objects? I don't want to re-write a .proto file that...
Shipmate asked 8/11, 2019 at 14:23

6

Solved

I've recently migrated a pet project from Blazor .NET 3.1 to .NET 5.0 and am trying to switch to using css isolation. I've created a scss file (which compiles to a css file using the webcompiler ex...
Aspia asked 14/11, 2020 at 11:57

5

I have a .NET 5 API using OpenApi. Is it possible to hide all API endpoints in swagger but the login one until user is authorized with a JWT Bearer Token? This is the code I use in startup.cs servi...
Charleton asked 25/1, 2021 at 10:20

© 2022 - 2024 — McMap. All rights reserved.