asp.net mvc - DNX vs DNX Core -


i have started simple "kick tires" asp.net mvc (beta) project in vs2015 , having issue wrapping head around dnx , dnx core references.

in example trying use datetime.toshortdatestring() , have intellisense dnx core enabled.

dnx core error

i understand because isn't implemented in dnx core , can wrap compiler directives around it.

conditional compilation

is correct approach? differences between 2 platforms documented anywhere? finally, if i'm windows, iis time shop dnx core offer or should first task to remove project.json file?

i guess answer depends.

dnx vs dnx core

dnx runs on top of today's .net framework (as mono), , has access full .net 4.5.2 (now .net 4.6) bcl. has been added .net since 1.0.

dnx core runs ontop of coreclr stripped down version of .net framework. things missing, things never coming on coreclr various reasons. don't know of specific list of coming / not coming. can poke around on corefx , coreclr github projects see there.

now question best approach. have few choices.

if you're not ever planning on running project on coreclr, can remove project.json together.

if plan on run on coreclr (whatever reason may be) can few things.

  • use common api methods environment

    in case if thedate.tostring("d") equivalent thedate.toshortdatestring() why not use former?

  • use appropriate compiler directive dnx451, etc.

    for environments don't have implementation of you're looking can throw or implement own version if makes sense.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -