Hi
We have created a .Net task that communicates with a 3rd party API - it works fine when we run the code directly in the designer.
We had to add references after installing .Net Framework 4.7 to System.Net.Http, Systsem.Net.Http.Headers and System.IO using Add File and pointing at the file location directly - we didn't seem to have all these references by default?
The code compiles and executes when we click the run button in the code designer window, and returns the expected results.
However when we execute the task itself it fails always with an error (the dll name changes every time we compile) :
Exception in Task: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\TEMP\u4ij5duw.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\Windows\TEMP\u4ij5duw.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at VisualCronAPI.ReflectionHelper.GetModules(LangT lang, String strCode, List`1 lstReferencedAssemblies) in C:\sourcefiles\code\VisualCronAPI\APIPublic\ReflectionHelper.vb:line 1247
at VisualCronAPI.ReflectionHelper.RunCode(LangT lang, String strCode, String strMethod, List`1 listParams, Type& OutputType, List`1 lstReferencedAssemblies) in C:\sourcefiles\code\VisualCronAPI\APIPublic\ReflectionHelper.vb:line 1241
at OBOKIIHBDBPMCFALPGECCIFHCDJPEDKODDGK.EJNAIJCFFNMLEJKOEMCAFNHHJNOEOOPPBMNA.EALKKEBDBMLNCEEKMOGGKOMAEBKFLBONGFCN() in C:\sourcefiles\code\VisualCronService\Jobs\TaskProcesses\Reflection\clsProcessTaskDotNETExecute.vb:line 58
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Please help!
Edited by moderator
2018-04-20T18:33:09Z
|
Reason: Not specified