AKG
AKG

Reputation: 357

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?

Upvotes: 6

Views: 826

Answers (1)

Nate Barbettini
Nate Barbettini

Reputation: 53710

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>

Upvotes: 11

Related Questions