I have a web API running on "netcoreapp1.0" which is using Azure Storage Client. Accessing blobs has no issue at all but when I try execute any operation with tables it throws me this error:
Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in System.Private.CoreLib.ni.dll
Additional information: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
The specific line it happens looks like this:
if (await table.ExistsAsync())
Even removing this, whenever it hits a line where it would actually do a HTTP call to Azure it still results the same. I am importing "net46", and I have tried also importing in my project.json "net40", but no change.
The code above is living in "Cameo.Azure.Storage.Library". It is targeting netstandard1.6 and it is referencing "WindowsAzure.Storage": "7.2.0" and "NETStandard.Library": "1.6.0".
My project.json is below:
{
"dependencies": {
"Cameo.Azure.Storage.Library": "1.0.0-*",
"Cameo.GeoLocation": "1.0.0-*",
"LightInject": "4.0.11",
"LightInject.Microsoft.DependencyInjection": "1.0.1",
"LocationService.Domain": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
"Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Swashbuckle": "6.0.0-beta902"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"net46",
"net40"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"xmlDoc": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
The librarie's project.json
{
"version": "1.0.0-*",
"dependencies": {
"Cameo.Azure.Storage.Interface": "1.0.0-*",
"LightInject": "4.0.11",
"Microsoft.Extensions.Configuration": "1.0.0",
"Microsoft.Extensions.Options": "1.0.0",
"NETStandard.Library": "1.6.0",
"WindowsAzure.Storage": "7.2.0"
},
"frameworks": {
"netstandard1.6": {
"imports": [
"net46"
]
}
}
}