Reputation: 4231
I tried the approach that was discussed over here to run Azure Functions on local machine. I was able to compile and run locally fine with the samples. But when I tried referencing nuget package by adding a project.json file and adding the namespace in my function it started throwing compilation error. On the portal it works fine. Am I missing any step?
project.json
{
"frameworks": {
".NETFramework,Version=v4.6": {
"dependencies": {
"Microsoft.Azure.DocumentDB": "1.6.3"
}
}
}
}
run.csx
using System;
using System.Diagnostics;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Azure.Documents;
public static void Run(TimerInfo input, TraceWriter log)
{
log.Verbose("C# Timer trigger function executed.");
}
Thanks!
Upvotes: 2
Views: 873
Reputation: 12538
Krishh,
This should definitely work locally. You may need to check the following:
Hope this helps!
Upvotes: 2