Home

function talking to table storage

%3CLINGO-SUB%20id%3D%22lingo-sub-1025429%22%20slang%3D%22en-US%22%3Efunction%20talking%20to%20table%20storage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1025429%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20folks%2C%20am%20new%20to%20the%20microsoft%20universe%20and%20have%20a%20real%20hard%20time%20getting%20started%20with%20functions.%3C%2FP%3E%3CP%3EWant%20to%20use%20a%20C%23%20CloudTable%20client%20in%20order%20to%20read%2C%20write%2C%20update%20and%20delete%20to%20a%20table%20I%20created%20in%20a%20storage%20account.%20But%20somehow%20I%20don't%20figure%20out%20on%20what%20packages%20to%20use%20in%20function.proj%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20the%20portal%20for%20developing%20the%20Function%20and%20currently%20got%20the%20function.proj%20setup%20like%20below%20but%20also%20tried%20other%20things%20since%20I%20found%20various%20versions%20out%20on%20the%20net...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CPROJECT%20sdk%3D%22Microsoft.NET.Sdk%22%3E%0A%3CPROPERTYGROUP%3E%0A%3CTARGETFRAMEWORK%3Enetstandard2.0%3C%2FTARGETFRAMEWORK%3E%0A%3C%2FPROPERTYGROUP%3E%0A%0A%3CITEMGROUP%3E%0A%3CPACKAGEREFERENCE%20include%3D%22RestSharp%22%20version%3D%22106.6.8%22%3E%3C%2FPACKAGEREFERENCE%3E%0A%3CPACKAGEREFERENCE%20include%3D%22Microsoft.Azure.Storage.Common%22%20version%3D%2211.1.1%22%3E%3C%2FPACKAGEREFERENCE%3E%0A%3CPACKAGEREFERENCE%20include%3D%22Microsoft.Azure.WebJobs.Extensions.Storage%22%20version%3D%223.0.10%22%3E%3C%2FPACKAGEREFERENCE%3E%0A%3C%2FITEMGROUP%3E%0A%0A%3C%2FPROJECT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20the%20runc.csx%20I%20put%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eusing%20Microsoft.Azure.Storage.Common%3B%0Ausing%20Microsoft.Azure.WebJobs.Extensions.Storage%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CSPAN%3Eto%20import%20it.%20But%20somehow%20it%20is%20nor%20working...I%20keep%20getting%20error%20when%20building%20a%20StorageAccount%20client%20telling%20my%20referencing%20is%20wrong...%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EIs%20a%20nuget%20package%20missing%20or%20do%20I%20have%20to%20import%20them%20in%20a%20different%20way%3F%20for%20RestSharp%20it%20works%20fine...%3F%20anybody%20can%20lend%20me%20a%20hand%3F%20Thanks!%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1025429%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFunction%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETable%20Storage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hi folks, am new to the microsoft universe and have a real hard time getting started with functions.

Want to use a C# CloudTable client in order to read, write, update and delete to a table I created in a storage account. But somehow I don't figure out on what packages to use in function.proj file.

 

I am using the portal for developing the Function and currently got the function.proj setup like below but also tried other things since I found various versions out on the net...

 

 

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RestSharp" Version="106.6.8"/>
<PackageReference Include="Microsoft.Azure.Storage.Common" Version="11.1.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.10" />
</ItemGroup>

</Project>

 

 

in the runc.csx I put 

 

 

using Microsoft.Azure.Storage.Common;
using Microsoft.Azure.WebJobs.Extensions.Storage;

 

to import it. But somehow it is nor working...I keep getting error when building a StorageAccount client telling my referencing is wrong...
 
Is a nuget package missing or do I have to import them in a different way? for RestSharp it works fine...? anybody can lend me a hand? Thanks!