Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 773
AKG Avatar asked Jun 30 '16 09:06

AKG


1 Answers

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>
like image 61
Nate Barbettini Avatar answered Sep 30 '22 11:09

Nate Barbettini