fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

Find a better way to detect web app execution environment #49

Closed dmitry-a-morozov closed 9 years ago

dmitry-a-morozov commented 9 years ago

I get this problem. image

It must be a better way to do this check https://github.com/fsprojects/FSharp.Configuration/blob/master/src/FSharp.Configuration/AppSettingsProvider.fs#L13

Maybe this? http://msdn.microsoft.com/en-us/library/system.web.hosting.hostingenvironment.ishosted(v=vs.110).aspx

vasily-kirichenko commented 9 years ago

Thanks, I'll try to fix it.

vasily-kirichenko commented 9 years ago

https://github.com/fsprojects/FSharp.Configuration/commit/b50cbcf1281b6a4c69bb2beb736529cc1b18901c Please try the latest NuGet (0.4.8).

dmitry-a-morozov commented 9 years ago

Works. Thanks. I'm perfectly happy with this solution but it won't work for OWIN/ASP vNext, right? Maybe make sense to start thinking about it.

vasily-kirichenko commented 9 years ago

To be honest, I'm not a web dev and know close to nothing about all these stuff and won't able to test whether the TP works in environments you mentioned.

dmitry-a-morozov commented 9 years ago

me too :)