How to fix: Add a reference to ".NETFramework,Version=v4.7.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore?
And yes, I have tried all similar QAs and nothing helped. What I have tried, none helped: 1. Delete bin/ & obj/ 2. Delete project.assets.json 3. Delete .vs/ 4. Reset entire git repo 5. Clean nuget ca...
- Modified
- 13 Apr at 09:27
BlazorInputFile - Synchronous reads are not supported
I am trying to use SteveSanderson's BlazorInputFile [package](https://github.com/SteveSandersonMS/BlazorInputFile) to upload files in a Blazor WASM app. (Server/Client setup). I installed the package...
Nlog Configuration with ServiceStack using NLog.Web.AspNetCore properties (${aspnet-user-identity} , ${aspnet-request-url}, etc.)
I am trying to get ServiceStack's Nlog configuration to work with NLog.Web.AspNetCore properties but when properties such as ${aspnet-user-identity} are used inside the nlog.config file, they always r...
- Modified
- 12 Apr at 09:36
Using IActionResult with Azure Functions in .NET 5?
After migrating my Azure Functions project to .NET 5, it has started wrapping my responses in a weird wrapper class. For instance, consider the following endpoint: ``` public record Response(string So...
- Modified
- 11 Apr at 13:11
File in use when publishing asp.net site with servicestack
When publishing my Asp.net Core ServiceStack site using WebDeploy with the AppOffiline rule to IIS I sometimes get an error that the main dll file is locked by another process. After troubleshooting, ...
- Modified
- 9 Apr at 19:52
The "correct" way to create a .NET Core console app without background services
I'm building a simple .NET Core console application that will read in basic options from the command line, then execute and terminate without user interaction. I'd like to take advantage of DI, so tha...
- Modified
- 8 Apr at 01:53
EF Core trying to drop index that doesn't exist
Experiencing an error when running a migration attempting to modify a column from being nullable to not-null. My model class looks like this: Previously, `SaleId` was of type `Guid?`. Here is the mode...
- Modified
- 16 May at 18:25
ImportError: cannot import name 'get_config' from 'tensorflow.python.eager.context'
My notebook was working up till today. At the beginning of my colab notebook I install tf-nightly, but now it is giving me this error: ``` -------------------------------------------------------------...
- Modified
- 19 Apr at 02:17
Using JwtAuthProviderReader with ServiceStack and AWS Cognito
We are using an existing userpool in , a separate client app is created for our api server. When using the hosted UI from Cognito , and . The issue is when adding to for doing the token validation ...
- Modified
- 4 Apr at 22:21
What changed in .net 5 that makes it not throw when changing dictionary values in foreach
In .NET<5 and .NET Core 3.1 the following code ``` var d = new Dictionary<string, int> { { "a", 0 }, { "b", 0 }, { "c", 0 } }; foreach (var k in d.Keys) { d[k]+=1; } ``` > System.InvalidOperatio...
Can return throw an exception?
While playing with C# I found that following snippet: ``` public int F() { try { return 0; } catch (Exception) { return -1; } } ``` This generates the follo...
Specified type not generating on DTO when added to ExportTypes
I have an enum that I want generated in my TS DTO file but it is not directly referenced on a response object. ``` public enum UserGridUserType { Admin, User, Etc } ``` I tried: ``` var n...
- Modified
- 2 Apr at 13:53
How to use ServiceStack to store POCOs to MariaDB having complex types (objects and structs) blobbed as JSON?
I've got following setup: C#, ServiceStack, MariaDB, POCOs with objects and structs, JSON. : how to use ServiceStack to store POCOs to MariaDB having complex types (objects and structs) blobbed as JSO...
- Modified
- 2 Apr at 08:13
Azure B2C authentication with ServiceStack for an API
Has anyone got a working sample please with ServiceStack AD authentication for a Azure AD B2C tenant? We would like to use servicestack but I can only find this old post about Azure B2C and it doesn'...
- Modified
- 29 Mar at 13:18
Sharing one gRPC proto file for all solutions
I've recently got my hands on gRPC on .net core and so far I'm very pleased with it.. the only problem I have is the proto files, for example: If I make a change on MyProtos.proto file in my grpc serv...
Why the tuple-type list element's value cannot be modified?
In C# 8.0, I can modify the value inside a tuple directly by accessing the field name: ``` (string name, int score) student = ("Tom", 100); student.name = "Jack"; Console.WriteLine(student); ``` And ...
- Modified
- 28 Mar at 09:56
How can I change the background color of Elevated Button in Flutter from function?
I am new to Flutter, and I started Flutter last week. And now I want to make a simple Xylophone application. I created the UI successfully and made a function `playSound(int soundNumber)`, but when I ...
- Modified
- 17 Feb at 05:31
Difference in lambda expressions between full .NET framework and .NET Core
Is there a difference in the declaration of lambda expressions between the .NET Framework and .NET Core? The following expressions compiles in .NET Core: ``` var lastShift = timeline.Appointments ...
What does the "default" generic constraint do?
The following code compiles, but it seems that Microsoft's docs don't mention this particular constraint type at all. ``` class TestGenericsBase<T1> { public virtual void Method1<T>(T arg) { ...
ServiceStack JsonServiceClient: SendAsync uses wrong path, ignores Route attribute?
I am using JsonServiceClient in a Xamarin app, like this: ``` JsonServiceClient client = new JsonServiceClient("https://my.domain.com/"); SetHeaders(client); var request = ...; // this is IRequest<T>...
- Modified
- 17 Jun at 00:6
App studio connection issue with SS 5.10.4
I Am trying to add a running project to app studio but I get error that I need at least SS v 5.8.1 [](https://i.stack.imgur.com/5yIZ0.png) I am using version 5.10.4 from myget. I have updated `app` t...
- Modified
- 21 Mar at 18:6
How to fix C# Warning CA1416 in vscode?
I'm just starting to learn following on [Youtube](https://www.youtube.com/channel/UCYbK_tjZ2OrIZFBvU6CCMiA). Upon writing along I get this problem pop up in vscode: ``` { "resource": "/d:/OneDrive/P...
- Modified
- 21 Mar at 16:37
Azure Kubernetes .NET Core App to Azure SQL Database Intermittent Error 258
We are running a .NET Core 3.1 application in a Kubernetes cluster. The application connects to an Azure SQL Database using EF Core 3.1.7, with Microsoft.Data.SqlClient 1.1.3. At seemingly random time...
- Modified
- 7 May at 05:40
Quartz.net: How to create jobs using Dependency Injection
I am trying to execute a Quartz scheduler job in .NET with a non-empty constructor and I try to use the default Dependency Injection of .NET to supply the dependencies. This is my job class which need...
- Modified
- 5 Sep at 12:28
How to install homebrew on M1 mac
I just got a new Mac, the M1 Macbook pro and I am trying to install homebrew, but every time I finish installing it, it tells me that it was not written to the path, and then when I try the advised wh...
- Modified
- 17 Mar at 02:24