简体   繁体   中英

WindowsAzure.Storage on not working on .Net Core 1.0

Experimenting with the new .Net Core 1.0 that was released yesterday. I'm not able to get WindowsAzure.Storage library to work. The compiler complains about multiple dependencies that don't support .NETCoreApp,Version=v1.0 .

The dependency Microsoft.Data.Edm 5.6.4 does not support framework .NETStandard,Version=v1.5.

The dependency Microsoft.Data.OData 5.6.4 does not support framework .NETStandard,Version=v1.5.

The dependency Microsoft.Data.Services.Client 5.6.4 does not support framework .NETStandard,Version=v1.5.

The dependency System.Spatial 5.6.4 does not support framework .NETStandard,Version=v1.5.

Does this mean that the WindowsAzure.Storage SDK isn't ready for .Net Core 1.0 yet?

WindowsAzure.Storage supports .NET Standard, but its dependencies do not. Microsoft.Data.OData and System.Spatial do not yet support .NET Standard.

The library source suggests adding the following imports property to your frameworks section in project.json:

"imports": [
    "dnxcore50",
    "portable-net451+win8"
]

This will temporarily import the PCL profile that these packages should have existing support for.

In newer csproj-based projects, the PackageTargetFallback property accomplishes the same thing:

<PropertyGroup>
  <PackageTargetFallback>dnxcore50;portable-net451+win8</PackageTargetFallback>
</PropertyGroup>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM