.net-5 Questions
5
Solved
I have an application that normally should be a simple console application to be programmed as a scheduled task from time to time called by the windows task scheduler.
The program should launch som...
Tinworks asked 9/2, 2021 at 10:18
5
Solved
I have a .Net 5 Web Api project and want to use
Mapster v7.2.0
to avoid mapping objects manually. The following code shows a sample scenario
setup a mapping configuration
map from multiple sourc...
19
Solved
I attempt to lunch my ASP.NET Core project in Microsoft Visual Studio 2019 and got this error: "Unable to connect to web server 'IIS Express'"
Visual Studio 2019 Version 16.9.5
.Net 5.0
...
Gastrula asked 7/8, 2021 at 17:43
7
Before .NET5 we serialize/deserialize the Bytes/Object by these code:
private static byte[] StructToBytes<T>(T t)
{
using (var ms = new MemoryStream())
{
var bf = new BinaryFormatter();...
Higginbotham asked 12/11, 2020 at 7:29
5
I've tried different ways to prevent this from happening.
After changing to render-mode="Server" I was able to prevent rendering twice on the first load.
But now when I refresh the page i...
3
Solved
I made a C# 9 source code generator, you can find it here
When I use the whole project inside another solution and reference it as a project it works but when I upload it with current configs into ...
2
Solved
According to the docs for .NET Core 5, there's a method SetBasePath and it's widely used in a bunch of blogs (example 1, example 2, example 3 etc.). There's no notion of it being a weird gotcha or ...
Novation asked 24/1, 2021 at 16:26
7
I have Microsoft .NET SDK 5.0.102 (x64) installed on my Windows 10, but when I do dotnet --list-sdks nothing shows up? I could see the SDK installed from Windows Apps & features. Thank you.
Edi...
Kamp asked 12/1, 2021 at 21:48
2
Please I updated my .NET 5 to .NET 6 and I have this errors on adding migration:
System.MissingMethodException: Method not found: 'System.Type Microsoft.EntityFrameworkCore.Metadata.ITypeBase.get_C...
Estevez asked 10/10, 2022 at 8:5
3
In the past I used the classes Installer, ServiceInstaller and ServiceProcessInstaller to make my app self-installable.
I just had to run InstallUtil.exe MyApp to install the app as a Windows Servi...
Liveryman asked 26/8, 2021 at 17:2
14
Solved
I have an API and a separate Azure Functions app. I upgraded my API app to .NET 5 and it's working fine. In the API app's solution, I have class library projects that I also reference in my Azure F...
Ignoramus asked 12/11, 2020 at 18:29
5
I am exploring Function App running on .net5 in the new isolated mode. I have HTTP triggered functions that I want to advertise via OpenAPI / Swagger.
To do so, I am using the package Microsoft.Azu...
Purusha asked 26/7, 2021 at 21:49
1
I have a netstandard2.0 library that is used by net5.0 applications
One of packages used by the library references Microsoft.Bcl.AsyncInterfaces 5.0.0
But I get this warning for every application:
...
Bola asked 1/12, 2021 at 9:0
2
One of the biggest hurdles when migrating from .NET Framework to .NET 5+ is having to convert all csproj's to the new SDK-style format. There is no tool to automate this, it has to be done manually...
Hominoid asked 17/1, 2023 at 21:44
2
Solved
I get the following Exception when I try to resolve the IOptionsSnapshot service:
'Cannot resolve scoped service 'Microsoft.Extensions.Options.IOptionsSnapshot`1[Test.MyOptions]' from root provide...
Dunnite asked 26/12, 2020 at 14:43
2
Solved
II have an "Edit" page in my .Net 5./ASP.Net MVC app. If ModelState.IsValid is "false", I want to check the individual errors before rejecting the entire page.
PROBLEM: How do I...
Heyward asked 13/9, 2021 at 20:8
2
Solved
I have a project that was running with .net core 3.1. After upgrading to .net 5 and entity framework core to 5.0.3, the include is not working anymore.
I have these classes
public class Question
{
...
Punchdrunk asked 5/3, 2021 at 9:8
2
Solved
I am writing a custom System.Text.Json.JsonConverter<T> to upgrade an old data model to a new version. I have overridden Read() and implemented the necessary postprocessing. However, I don't ...
Toque asked 23/12, 2020 at 20:15
3
Solved
This is my first gRPC application. I'm attempting to invoke a server-streaming RPC call from a .NET 5 gRPC client (Grpc.Net.Client 2.35.0) which results in the following exception in my local devel...
5
When I use Fluent assertions to test if a property is not null, the analysers still complain about subsequent lines which dereference that line as possibly null. Is there any way to get the compile...
Pansie asked 22/9, 2021 at 11:15
2
Hello everyone I got an error and I`m trying to solve it I found some similar source but could not solve my problem. Similar problem like here.
I compile my project .csproj file using .bat file act...
Dianadiandra asked 24/2, 2021 at 17:57
2
Solved
I'm trying to make a asynconus azure function in .net 5 but when it start up i get the following error:
[2020-11-16T10:41:06.023Z] A host error has occurred during startup operation '7cd2e743-b753...
Fizzy asked 16/11, 2020 at 11:7
3
I have used the try-convert tool to convert my projects from .NET Framework to .NET 5.0
When inspecting the converted *.csproj files for projects that are targeting .net50-windows I noticed the ele...
2
I'm trying to use https://github.com/ligershark/WebOptimizer as suggested by microsoft in order to bundle and minimise my js files, so following the instructions, I have the following in my startup...
Contrivance asked 22/3, 2022 at 15:39
2
Solved
EDIT: Thank you everyone! I have never upgraded to a newer version of
.NET and language version before. Thus didn't know about .csproj
configuration. Even though I did a research before posting a ...
Metaphor asked 14/6, 2021 at 23:54
© 2022 - 2024 — McMap. All rights reserved.