When you build, check out the “Project” column – it notes that the build that is failing is “ASP.NET Core 5.0” (not “ASP.NET 5.0”). In the upper left dropdown of the code editor, you can choose different views – if you select the “ASP.NET Core 5.0” one, you’ll see that the NodaTime namespace is undefined.
It looks like the new ASP.NET project templates are creating multi-targeted apps, both aspnet50 and aspnetcore50.
ASP.NET 5.0 is (currently) based on .NET 4.5.x, so the NodaTime portable (net4) satisfies that platform. ASP.NET Core 5.0 is based on the new CoreClr (aspnetcore50), and there’s no binaries in the NodaTime library that support it.
To resolve, you can just drop support for CoreClr in your application by removing the “aspnetcore50” entry in project.json under “frameworks”:
"frameworks": {
"aspnet50": { }
//"aspnetcore50": { }
},
Now your app should build just targeting ASP.NET 5.0 and not the CoreClr.