Upgrading to .NET8 from desktop versions 4.8.X
Upgrade to Latest .NET OVERALL Problems and differences encountered taking applications from .NET 4.8 desktop to .NET 8 . SUGGESTION Rebuild the solution and project files from scratch with latest .NET 8. PROBLEMS APIs On later .NET APIs (post 4.8 desktop), you need to be extra carefully about how the inbound objects are declared. So if integer in Postman, then must be integer in object. In older .NET, they accept properties as strings. Example - Say body in Postman is: { "SettingData" : 31000 } Pretend endpoint method is: [HttpPut("cache/resettimer")] [Produces("application/json")] [ProducesResponseType(typeof(ResetCacheResponse), Status200OK)] public async Task<HttpResponseMessage> MyMethod ([FromBody] InputData input) Later .NET must be: public class InputData { public int SettingData { get; set; } } ...
Comments
Post a Comment