Domanda

I'm running an azure webjob using the new webjob sdk. Each time I trigger the job I get this error. I look in the scm and the file is there, anyone else had this issue?

//details

[01/26/2014 21:58:41] Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. [01/26/2014 21:58:41] at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) [01/26/2014 21:58:41] at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters() [01/26/2014 21:58:41] at System.Reflection.RuntimeMethodInfo.GetParameters() [01/26/2014 21:58:41] at Microsoft.WindowsAzure.Jobs.Indexer.GetMethodDescriptor(MethodInfo method) [01/26/2014 21:58:41] at Microsoft.WindowsAzure.Jobs.Indexer.IndexMethod(Func2 funcApplyLocation, MethodInfo method, IndexTypeContext context) [01/26/2014 21:58:41] at Microsoft.WindowsAzure.Jobs.Indexer.IndexType(Func2 funcApplyLocation, Type type) [01/26/2014 21:58:41] at Microsoft.WindowsAzure.Jobs.Internals.FunctionStore..ctor(String dataConnectionString, IConfiguration config, IEnumerable`1 types) [01/26/2014 21:58:41] at Microsoft.WindowsAzure.Jobs.JobHostContext..ctor(String dataConnectionString, String runtimeConnectionString, JobHostTestHooks hooks) [01/26/2014 21:58:41] at Microsoft.WindowsAzure.Jobs.JobHost..ctor(String dataConnectionString, String runtimeConnectionString, JobHostTestHooks hooks) [01/26/2014 21:58:41] at Factory.Program.Main(String[] args) [01/26/2014 21:58:41 > 8bbfc2: SYS ERR ] Job failed due to exit code -532462766

È stato utile?

Soluzione

You have to ensure that the zip that you upload should have the exe and all the dlls required for the WebJob to run. It seems like you are missing the JSON.NET dll when uploading the zip.

Please ensure you do the following. Select all of the files in the folder, right-click the selected files, and click Send to -- Compressed Folder.

Please follow this article http://www.asp.net/aspnet/overview/developing-apps-with-windows-azure/getting-started-with-windows-azure-webjobs

Altri suggerimenti

We had the same problems and at the end we decided to update the Newton to the 10.0.0 version and the framework to the 4.6.1, and also to avoid using the "Any CPU" and use the x64 into all the projects.

Since that, no more problems with the newton.

Try to identify if all the projects has the same version of the newton, FW and compile type. Maybe you have a newton in the 10 and a internal project has the 4.0 or viceversa.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top