[Solved] Reference to Server.Jobs.Add(Job) does not exist - VisualCron - Forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Henrik what happened to Server.Jobs.Add(Job) ? How do I programmically enter in a new job with 6.1.4? Thanks
Sponsor
Forum information
Support
13 years ago
It is there but perhaps, based on your description, you are trying to get to a static method. You need an instance of the serverObject like this:

Server s = new Server();
s.Jobs.Add(j);

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Dim Connection As New Connection With {.ConnectionType = Connection.ConnectionT.Remote, .Address = "XXX", .Port = 16444, .UseADLogon = True}
Dim Client As New Client
Dim MyServer As VisualCronAPI.Server = Client.Connect(Connection, True)
Dim Job As New JobClass With {.Name = "Test", .TimeOut = New TimeOutClass With {.Minutes = 5, .Use = True, .ConsiderError = True}}

'This following line does dot compile anymore
MyServer.Jobs.add(Job)




Henrik what i get is a Import of type 'VisualCron.JobClass' from assembly or module '<unknown>' failed.

This worked prior to 6.1.4

Help appreciated thanks
Support
13 years ago
Originally Posted by: jmehl 

Dim Connection As New Connection With {.ConnectionType = Connection.ConnectionT.Remote, .Address = "XXX", .Port = 16444, .UseADLogon = True}
Dim Client As New Client
Dim MyServer As VisualCronAPI.Server = Client.Connect(Connection, True)
Dim Job As New JobClass With {.Name = "Test", .TimeOut = New TimeOutClass With {.Minutes = 5, .Use = True, .ConsiderError = True}}

'This following line does dot compile anymore
MyServer.Jobs.add(Job)




Henrik what i get is a Import of type 'VisualCron.JobClass' from assembly or module '<unknown>' failed.

This worked prior to 6.1.4

Help appreciated thanks



Ok, but the API Test project in API folder compile alright? Because it is doing similar stuff.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
It does not compile unfortunately. I have checked the references to the 2 dll's and its referencing the latest dll's.
Support
13 years ago
Same problem in this version for you?

http://www.visualcron.co....aspx?g=posts&t=2743 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Henrik, any reason why your c# test app will work under 6.1.4 but when I use VB.NET it doesn't.

I misinformed you in my previous post. The test app does work.
Support
13 years ago
Can you send test sample project here that does not work?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Imports VisualCronAPI
Imports VisualCron

Module Module1
    Sub Main()
        Dim Connection As New Connection With {.ConnectionType = Connection.ConnectionT.Remote, .Address = "XXX", .Port = 16444, .UseADLogon = True}
        Dim Client As New Client
        Dim MyServer As Server = Client.Connect(Connection, True)
        Dim Job As New JobClass With {.Name = "Test", .TimeOut = New TimeOutClass With {.Minutes = 5, .Use = True, .ConsiderError = True}}

        'This following line does dot compile anymore
        ' MyServer.Jobs.add(Job)
    End Sub

End Module


I just confirmed Henrik that when I create a c# app everything works just fine (ie I can reference server.jobs.add()
When I create a vb app it does not allow me to reference Server.Jobs.Add() and intillisense does not show all the properties of the Server.Jobs class.





Support
13 years ago
I think I need the whole project file - might be something specific with that. Please attach.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Support
13 years ago
Thanks, the issue is a combination of our obfuscation of code and the VB.NET compiler. We have done a slight change which *should* make it work. We will release a new version tomorrow in beta forum (update current 6.1.5 download). Please check later tomorrow.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Have you had a chance to fix in beta 6.1.5? Thanks
Support
13 years ago
Originally Posted by: jmehl 

Have you had a chance to fix in beta 6.1.5? Thanks



Yes, please try it.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
I tried again this morning and nothing has changed in 6.1.5 that exposes the Server.Jobs.Add method.

Anything else I can try? I may just convert to C# and do that but I am avoiding that solution.
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
Henrik, does it work in a VB development environement on your end? Can you give me latest API dlls to try?
Support
13 years ago
Originally Posted by: jmehl 

Henrik, does it work in a VB development environement on your end? Can you give me latest API dlls to try?



Will do and get back to you. Sorry for keeping you waiting.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
13 years ago
I did try and it worked. Did you really re-download the latest exe from:

http://www.visualcron.co....aspx?g=posts&t=2743 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jmehl
  •  jmehl
  • No customer Topic Starter
13 years ago
You da man! Thanks...works great! Is 6.1.5 stable enough to be deployed on a production system?
Support
13 years ago
Yes, that is my opinion. Thanks for the feedback.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top