.net-core-3.0

NuGet: Necessary to reference implicit dependencies?

岁酱吖の 提交于 2020-05-23 13:31:30
问题 I recently upgraded from ASP.NET Core 2.2. to 3.0. With the changes regarding their meta packages, I'm now in a state where everything works, but some pretty important packages are not explicitly referenced. Everything works because, they're implicitly referenced. For example: You can see that I'm explicitly referencing Microsoft.EntityFrameworkCore.SqlServer, however I am NOT referencing Microsoft.EntityFrameworkCore explicitly. It's still pulled in because it's an indirect reference it

ASP .Net Core 3.0 ShortName in the Display Attribute (DataAnnotations)

霸气de小男生 提交于 2020-05-15 11:50:07
问题 This question was asked in the past and the answer here https://stackoverflow.com/a/45236544/3074765 has been a life saver for me. The problem is that when I migrated to .Net Core 3.0, it broke. The reason can be found here https://github.com/aspnet/AspNetCore/issues/8678 . In a nutshell, Microsoft had made some functions public that were in a class that was labeled internal. Fixing this removed access to ExpressionMetadataProvider. Consider the following HTML Helper using Microsoft

Cannot add appsettings.json inside WPF project .net core 3.0

五迷三道 提交于 2020-05-14 18:37:25
问题 I am creating a WPF project using .net Core 3.00 , and I am having trouble adding the item appsettings.json file to my project which is to be used to store my DB connection string. I would normally have done inside the app.config , but this has now been removed from .net Core . Everywhere mentions using appsettings.json as a replacement, and that it has to be maunally added & initialised in the OnStartUp() function using an instance of IConfiguration , and there after using Dependancy

Deserialization of reference types without parameterless constructor is not supported

浪子不回头ぞ 提交于 2020-05-13 06:57:06
问题 I have this API public ActionResult AddDocument([FromBody]AddDocumentRequestModel documentRequestModel) { AddDocumentStatus documentState = _documentService.AddDocument(documentRequestModel, DocumentType.OutgoingPosShipment); if (documentState.IsSuccess) return Ok(); return BadRequest(); } And this is my request model public class AddDocumentRequestModel { public AddDocumentRequestModel(int partnerId, List<ProductRequestModel> products) { PartnerId = partnerId; Products = products; } [Range(1

Deserialization of reference types without parameterless constructor is not supported

旧巷老猫 提交于 2020-05-13 06:56:06
问题 I have this API public ActionResult AddDocument([FromBody]AddDocumentRequestModel documentRequestModel) { AddDocumentStatus documentState = _documentService.AddDocument(documentRequestModel, DocumentType.OutgoingPosShipment); if (documentState.IsSuccess) return Ok(); return BadRequest(); } And this is my request model public class AddDocumentRequestModel { public AddDocumentRequestModel(int partnerId, List<ProductRequestModel> products) { PartnerId = partnerId; Products = products; } [Range(1

How to fix 'The current thread is not associated with the renderer's synchronization context'?

戏子无情 提交于 2020-05-13 04:54:14
问题 I am trying to change change a string, being used for a title, in my blazor-server-side application. But I am having trouble getting the UI to update. I tried using StateHasChanged(), but that didn't work so I looked around and found that on the FlightFinder Demo that was made, it has an OnChange event Action, so I am trying to implement that. It works until I try to refresh the browser, then I am hit with this error System.InvalidOperationException: 'The current thread is not associated with

How to fix 'The current thread is not associated with the renderer's synchronization context'?

佐手、 提交于 2020-05-13 04:53:51
问题 I am trying to change change a string, being used for a title, in my blazor-server-side application. But I am having trouble getting the UI to update. I tried using StateHasChanged(), but that didn't work so I looked around and found that on the FlightFinder Demo that was made, it has an OnChange event Action, so I am trying to implement that. It works until I try to refresh the browser, then I am hit with this error System.InvalidOperationException: 'The current thread is not associated with

How to fix 'The current thread is not associated with the renderer's synchronization context'?

二次信任 提交于 2020-05-13 04:53:08
问题 I am trying to change change a string, being used for a title, in my blazor-server-side application. But I am having trouble getting the UI to update. I tried using StateHasChanged(), but that didn't work so I looked around and found that on the FlightFinder Demo that was made, it has an OnChange event Action, so I am trying to implement that. It works until I try to refresh the browser, then I am hit with this error System.InvalidOperationException: 'The current thread is not associated with

.NET Core 3.0 Publish for ARM64

醉酒当歌 提交于 2020-05-12 02:47:15
问题 Does anyone know how to publish a .NET Core 3.0 application for ARM64? I can only select "linux-arm" but no "linux-arm64". Setting linux-arm in combination with x64 also doesnt work. It says the settings are not compatible. As stated here it should already be supported: https://github.com/dotnet/core/blob/master/release-notes/3.0/3.0-supported-os.md 回答1: The linked article points to the supported OSs, not the list of runtime identifiers. An explanation of an RID and a list of common ones can

.NET Core 3.0 Publish for ARM64

痴心易碎 提交于 2020-05-12 02:46:55
问题 Does anyone know how to publish a .NET Core 3.0 application for ARM64? I can only select "linux-arm" but no "linux-arm64". Setting linux-arm in combination with x64 also doesnt work. It says the settings are not compatible. As stated here it should already be supported: https://github.com/dotnet/core/blob/master/release-notes/3.0/3.0-supported-os.md 回答1: The linked article points to the supported OSs, not the list of runtime identifiers. An explanation of an RID and a list of common ones can