.net-core-3.0

“The project 'Web' must provide a value for Configuration” error after migrating to .NET Core 3

[亡魂溺海] 提交于 2020-04-10 06:52:29
问题 I've migrated an ASP.NET Core 2.2 project to Core 3.0 and am getting the error: The project [Project location] must provide a value for Configuration. There's not really a lot to go on with that error message, does anyone know how to resolve this error? This looks like it could be similar to this issue on the dotnet cli github repo. 回答1: The issue turned out to be that I was still referencing Microsoft.AspNetCore.Razor.Design Version="2.2.0" in the .proj file's package references. Deleting

“The project 'Web' must provide a value for Configuration” error after migrating to .NET Core 3

风格不统一 提交于 2020-04-10 06:50:48
问题 I've migrated an ASP.NET Core 2.2 project to Core 3.0 and am getting the error: The project [Project location] must provide a value for Configuration. There's not really a lot to go on with that error message, does anyone know how to resolve this error? This looks like it could be similar to this issue on the dotnet cli github repo. 回答1: The issue turned out to be that I was still referencing Microsoft.AspNetCore.Razor.Design Version="2.2.0" in the .proj file's package references. Deleting

“The project 'Web' must provide a value for Configuration” error after migrating to .NET Core 3

ⅰ亾dé卋堺 提交于 2020-04-10 06:50:26
问题 I've migrated an ASP.NET Core 2.2 project to Core 3.0 and am getting the error: The project [Project location] must provide a value for Configuration. There's not really a lot to go on with that error message, does anyone know how to resolve this error? This looks like it could be similar to this issue on the dotnet cli github repo. 回答1: The issue turned out to be that I was still referencing Microsoft.AspNetCore.Razor.Design Version="2.2.0" in the .proj file's package references. Deleting

“The project 'Web' must provide a value for Configuration” error after migrating to .NET Core 3

隐身守侯 提交于 2020-04-10 06:50:15
问题 I've migrated an ASP.NET Core 2.2 project to Core 3.0 and am getting the error: The project [Project location] must provide a value for Configuration. There's not really a lot to go on with that error message, does anyone know how to resolve this error? This looks like it could be similar to this issue on the dotnet cli github repo. 回答1: The issue turned out to be that I was still referencing Microsoft.AspNetCore.Razor.Design Version="2.2.0" in the .proj file's package references. Deleting

ASP.NET MVC Core 3.0 API Serialize Enums to String

会有一股神秘感。 提交于 2020-03-18 04:28:07
问题 How to serialize Enum fields to String instead of an Int in ASP.NET MVC Core 3.0? I'm not able to do it the old way. services.AddMvc().AddJsonOptions(opts => { opts.JsonSerializerOptions.Converters.Add(new StringEnumConverter()); }) I'm getting an error: cannot convert from 'Newtonsoft.Json.Converters.StringEnumConverter' to 'System.Text.Json.Serialization.JsonConverter' 回答1: New System.Text.Json serialization ASP.NET MVC Core 3.0 uses built-in JSON serialization. Use System.Text.Json

.net core 3 yields different floating point results from version 2.2

旧街凉风 提交于 2020-03-16 07:28:46
问题 Here is a sample piece of code with outputs from .net core 2.2 and 3.1. It shows different computational results for a basic floating point expression a^b. In this example we calculate 1.9 to the power of 3. Previous .NET frameworks yielded the correct result, but .net core 3.0 and 3.1 yields a different result. Is this an intended change and how can we migrate financial calculation code to the new version with a guarantee that numerical calculations will still yield the same results? (It

Oauth2 with Postman and IdentityServer4

孤街醉人 提交于 2020-03-03 07:48:48
问题 This bounty has ended . Answers to this question are eligible for a +250 reputation bounty. Bounty grace period ends in 8 hours . Bastien Vandamme wants to draw more attention to this question: I need help on this one. Is there people fro Postman community that can help? I'm trying to register authenticate with Postman on my Identity Server 4. It worked with .Net Code 2 but I recently updated to .Net Core 3 and did adaptations. I can open my login page, I can login but then I'm not redirected

Oauth2 with Postman and IdentityServer4

纵然是瞬间 提交于 2020-03-03 07:48:11
问题 This bounty has ended . Answers to this question are eligible for a +250 reputation bounty. Bounty grace period ends in 8 hours . Bastien Vandamme wants to draw more attention to this question: I need help on this one. Is there people fro Postman community that can help? I'm trying to register authenticate with Postman on my Identity Server 4. It worked with .Net Code 2 but I recently updated to .Net Core 3 and did adaptations. I can open my login page, I can login but then I'm not redirected

System.Text.Json: How do I specify a custom name for an enum value?

纵然是瞬间 提交于 2020-02-25 00:53:15
问题 Using the System.Text.Json serializer capabilities in .NET Core, how can I specify a custom value for an enum value, similar to JsonPropertyName ? For example: public enum Example { Trick, Treat, [JsonPropertyName("Trick-Or-Treat")] // Error: Attribute 'JsonPropertyName' is not valid on this declaration type. It is only valid on 'property, indexer' declarations. TrickOrTreat } 回答1: This is not currently supported out of the box in .net-core-3.0 . There is currently an open issue Support for

System.Text.Json: How do I specify a custom name for an enum value?

不想你离开。 提交于 2020-02-25 00:52:08
问题 Using the System.Text.Json serializer capabilities in .NET Core, how can I specify a custom value for an enum value, similar to JsonPropertyName ? For example: public enum Example { Trick, Treat, [JsonPropertyName("Trick-Or-Treat")] // Error: Attribute 'JsonPropertyName' is not valid on this declaration type. It is only valid on 'property, indexer' declarations. TrickOrTreat } 回答1: This is not currently supported out of the box in .net-core-3.0 . There is currently an open issue Support for