Setting up NodaTime for Asp.Net vnext

I have installed VS2015 CTP, created a vNext ConsoleApplication and would like to use NodaTime.

I added a dependency like this:

"dependencies": {
    "NodaTime": "1.3.1"
},

      

The package recovers, but when I try to compile the solution, a warning comes up:

Type NodaTime.Instant exists in the package: NodaTime 1.3.1, Supported frameworks: .NETFramework 3.5-Client;.NETPortable-net40+sl50+win+wpa81+wp80+MonoAndroid10+MonoTouch10+xamarinios10

      

This type is simply not found by the compiler, telling me:

The type or namespace name 'NodaTime' could not be found (are you missing a using directive or an assembly reference?)

      

Any ideas on how to fix this? Can I also add it as a dependency of the framework for which it exists?

+3


source to share


1 answer


Most of the existing packages do not yet support ASP.NET Core 5; due to significant differences, they must be manually updated. If you want to use NodaTime, you'll either have to stick with ASP.NET 5 (not Core) or wait for Jon Skeet to release the Core version.



ASP.NET 5 (not Core) will still let you take advantage of all the new features, though ... except cross platform.

+3


source







All Articles