.net-core-3.0

Can WPF applications be run in Linux with .Net Core 3?

拜拜、爱过 提交于 2020-02-12 08:48:45
问题 Microsoft announced .Net Core 3 comes with WPF and Windows Forms. So can I create a Desktop application for Linux or Mac using .Net Core 3? 回答1: No, they have clearly stated that these are windows only. In one of the .NET Core 3.0 discussions, they have also clarified that they do not intend to make these features cross-platform in the future since the whole concept is derived from windows specific features. They talked about thinking of a whole new idea for cross-platform applications, which

Serializing Manatee.Json in .NET Core 3

半腔热情 提交于 2020-01-25 10:14:08
问题 Background I want to provide some JsonSchema from my .NET Core 3 application, as well as other objects serialized into JSON. Since Manatee.Json is frequently updated and provides good support for JsonSchema, they are my preferred choice. At the same time, .NET Core 3 provides excellent support for returning objects with magic that transform them into JSON documents. Example: public ActionResult<MyFancyClass> MyFancyAction() { return new MyFancyClass { Property1 = "property 1 content",

DI Registration service type .net core 3.0

不打扰是莪最后的温柔 提交于 2020-01-25 08:34:07
问题 I have one n-tier layered app and in Infrastructure module where I'm trying to develop sending email for confirmation an user, I'm getting an error. No service for type 'IMS.Infrastructure.Helpers.CustomEmailConfirmationTokenProvider`1[Microsoft.AspNetCore.Identity.IdentityUser]' has been registered. From code what I had did is next: public class CustomEmailConfirmationTokenProvider<TUser> : DataProtectorTokenProvider<TUser> where TUser : class { public CustomEmailConfirmationTokenProvider

after upgrade to .net core 3.0 error“No webpage was found for the web address: https://localhost:44374/”

妖精的绣舞 提交于 2020-01-25 00:19:05
问题 I upgrade my project that have 2 classes library and one Mvc project to MVC Core 3.0 from 2.2 whit this page enter link description here change .net <TargetFramework>netcoreapp3.0</TargetFramework> 2.change like this <ItemGroup> <!--<PackageReference Include="Microsoft.AspNetCore.App" />--> <!--<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />--> <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.0.0" /> <!--<PackageReference Include="Microsoft

Asp.net core 2.1 to Asp.net 3.0 upgrade

最后都变了- 提交于 2020-01-24 12:24:06
问题 I have a web api application which is working fine in 2.1. I am using same application to host in IIS on windows and without IIS on linux. Now I am trying to upgrade the application. I have upgraded the nuget packages and project version successfully.Now when trying to debug app looks there is some problem in my congiruation startup class which is as below public static void Main(string[] args) { StartupShutdownHandler.BuildWebHost(args).Build().Run(); } namespace MyApp { public class

Making member virtual prevents calling default interface implementation and causes StackOverflowException in C# 8

夙愿已清 提交于 2020-01-23 08:02:14
问题 Consider the code: class ChildClass : BaseClass { public void Method1() {} //some other method } abstract class BaseClass : IChildInterface { public virtual //<- If we add virtual so that this method can be overridden by ChildClass, we get StackOverflowException and DoWork() implementation in IChildInterface is never called. void DoWork() { //base class specific implmentation ((IChildInterface)this).DoWork(); //call into default implementation provided by IChildInterface } } interface

Making member virtual prevents calling default interface implementation and causes StackOverflowException in C# 8

丶灬走出姿态 提交于 2020-01-23 07:58:08
问题 Consider the code: class ChildClass : BaseClass { public void Method1() {} //some other method } abstract class BaseClass : IChildInterface { public virtual //<- If we add virtual so that this method can be overridden by ChildClass, we get StackOverflowException and DoWork() implementation in IChildInterface is never called. void DoWork() { //base class specific implmentation ((IChildInterface)this).DoWork(); //call into default implementation provided by IChildInterface } } interface

Why C#8 Default implementations of interface members will report an error

前提是你 提交于 2020-01-15 12:36:07
问题 Why C#8 Default implementations of interface members will report an error? public interface Logger { void Info(string message); void Error(string message); // C#8 Default implementations of interface void Warn(string message) { // "interface method cannot declare a body" error message } } and .NET Core 3.0 is configured as shown in the screenshot. 回答1: This is a Resharper/Rider bug: https://youtrack.jetbrains.com/issue/RSRP-474628 回答2: The feature is sound and your setup is correct. Also the

DataMember Attribute is not honored in dotnet core 3.0

南笙酒味 提交于 2020-01-15 06:51:30
问题 I created a sample dotnet core 3.0 Web API project and did the following changes, Create a Model class TestData using System.Runtime.Serialization; namespace WebApplication17.Models { [DataContract] public class TestData { [DataMember(Name = "testaction")] public string Action { get; set; } } } Then I made changes in controller WeatherForecastController , to add a post endpoint [HttpPost("package/{packageName}/version/{version}")] public void Post(string packageName, string version, [FromBody

Deploying .NET Core 3.0 API to Azure Web App using Release Pipeline

有些话、适合烂在心里 提交于 2020-01-14 14:15:55
问题 I'm attempting to upgrade my API from .NET Core 2.2 to 3.0, but I cannot get the Azure Web App to actually run the application using 3.0. My build pipeline configuration: trigger: - master pool: vmImage: 'ubuntu-latest' variables: buildConfiguration: 'Release' steps: - task: UseDotNet@2 displayName: 'Use .NET Core 3' inputs: version: 3.x - script: dotnet tool install --global dotnet-ef - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration