SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
708 stars 108 forks source link

Remove dependency on Microsoft.AspNetCore package #214

Closed theimowski closed 4 years ago

theimowski commented 4 years ago

This is related to https://github.com/SAFE-Stack/SAFE-template/issues/326

Don't know the details but the Microsoft.AspNetCore package seems to be "obsolete"/"not meant to be used anymore" (It's been last updated 03.12.2018, while e.g. Microsoft.AspNetCore.App on 2 months ago)

For some reason having this package as a dependency makes the webapp fail in Azure AppEngine environment

baronfel commented 4 years ago

IIRC when targeting .netcore3.x the dependency on Microsoft.AspNetCore should be removed and instead a dependency on the Microsoft.Net.Web.Sdk should be added. This is because the entire aspnetcore infrastructure is now bundled as an 'sdk' component, much the the BCL/runtime itself. I am not sure how to do this in a way that retains the backwards-compatibility for the 2.x environment though.

baronfel commented 4 years ago

Here's a good example: https://github.com/prometheus-net/prometheus-net/blob/master/Prometheus.AspNetCore/Prometheus.AspNetCore.csproj

note the conditional dependency on a frameworkreference to aspnetcore instead of the packagereference

baronfel commented 4 years ago

This should be closed now with #215 having been merged and released.

theimowski commented 4 years ago

Yup, fixed in 0.11 - thanks a lot!