gpt4 book ai didi

asp.net - 在 Asp.Net vnext 下设置 NodaTime

转载 作者:行者123 更新时间:2023-12-01 13:52:35 25 4
gpt4 key购买 nike

我已经安装了 VS2015 CTP,创建了一个 vNext ConsoleApplication 并且想使用 NodaTime。

我已经像这样添加了依赖:

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

包已恢复,但当我尝试编译解决方案时,出现警告:

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

然后编译器根本找不到该类型,告诉我:

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

关于如何解决这个问题的任何想法?我是否也可以将它添加为它存在的框架的依赖项?

最佳答案

大多数现有包尚不支持 ASP.NET Core 5;由于存在显着差异,因此需要手动更新它们。如果您想使用 NodaTime,您要么需要坚持使用 ASP.NET 5(而非 Core),要么等待 Jon Skeet 发布 Core 版本。

ASP.NET 5(不是 Core)仍然允许您使用所有新功能,但是...除了不能跨平台。

关于asp.net - 在 Asp.Net vnext 下设置 NodaTime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30575530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com