G
Guest
Dear Experts,
I've completed my console application and now wants to compile the
application and an executable file to be run at another location. However,
I've tried compiling that program in the command prompt with the following
command :
vbc Module1.vb /out:OEAutomation.exe /t:exe
I received a lot of error messages.
-------------------------------------------------------------------------------------------
D:\OEAutomation\OEAutomation\Module1.vb(3) : error BC30466: Namespace or
type 'Mail' for the Imports 'System.Web.Mail' cannot be
Imports System.Web.Mail
~~~~~~~~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(8) : error BC30002: Type 'SmtpMail'
is not defined.
Public smtp As SmtpMail
~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(9) : error BC30002: Type
'MailMessage' is not defined.
Public msgOELog As MailMessage = New MailMessage()
~~~~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(23) : error BC30002: Type 'clsFTP'
is not defined.
Dim ff As clsFTP
~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(24) : error BC30002: Type 'SmtpMail'
is not defined.
Dim smtpErrorToIT As SmtpMail
~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(25) : error BC30002: Type
'MailMessage' is not defined.
Dim msgErrorMailToIT As MailMessage = New MailMessage()
~~~~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(27) : error BC30451: Name 'Today' is
not declared.
dtCurrentDate = Today
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(28) : error BC30451: Name 'Weekday'
is not declared.
If Weekday(dtCurrentDate) = 2 Then
~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(35) : error BC30451: Name 'Month' is
not declared.
strOEYesterdayLogFilename = "eoe" & Month(dtPreviousDate) &
Day(dtPreviousDate) & ".txt"
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(35) : error BC30451: Name 'Day' is
not declared.
strOEYesterdayLogFilename = "eoe" & Month(dtPreviousDate) &
Day(dtPreviousDate) & ".txt"
~~~
D:\OEAutomation\OEAutomation\Module1.vb(36) : error BC30451: Name 'Month' is
not declared.
strOETodayLogFilename = "eoe" & Month(dtCurrentDate) &
Day(dtCurrentDate) & ".txt"
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(36) : error BC30451: Name 'Day' is
not declared.
strOETodayLogFilename = "eoe" & Month(dtCurrentDate) &
Day(dtCurrentDate) & ".txt"
~~~
D:\OEAutomation\OEAutomation\Module1.vb(49) : error BC30451: Name 'vbLf' is
not declared.
msgOELog.Body = "Dear All," & vbLf & vbLf
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(49) : error BC30451: Name 'vbLf' is
not declared.
msgOELog.Body = "Dear All," & vbLf & vbLf
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(57) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Started")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(61) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Started")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(68) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Old Log Rename Successfully")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(72) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Yesterday Old Log Rename
Successfully")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(76) : error BC30002: Type 'clsFTP'
is not defined.
ff = New clsFTP()
~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(119) : error BC30451: Name 'vbCrLf'
is not declared.
objOutputLogFile.WriteLine("Specific Error=" & ex.Message +
vbCrLf)
~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(131) : error BC30451: Name 'Hour' is
not declared.
If Hour(Now()) = 9 Then
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(131) : error BC30451: Name 'Now' is
not declared.
If Hour(Now()) = 9 Then
~~~
D:\OEAutomation\OEAutomation\Module1.vb(149) : error BC30451: Name 'Hour' is
not declared.
If Hour(Now()) = 15 Then
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(149) : error BC30451: Name 'Now' is
not declared.
If Hour(Now()) = 15 Then
~~~
D:\OEAutomation\OEAutomation\Module1.vb(183) : error BC30451: Name 'vbLf' is
not declared.
msgOELog.Body = msgOELog.Body & dtDate & vbLf
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(198) : error BC30451: Name 'Replace'
is not declared.
arrFileContent(lngCounter) = Replace(arrFileContent(lngCounter),
strPipe, "|")
~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(207) : error BC30451: Name 'Len' is
not declared.
If Len(strTempString) = 0 Then
~~~
D:\OEAutomation\OEAutomation\Module1.vb(215) : error BC30451: Name 'Trim' is
not declared.
strTempString = Trim(strTempString)
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(216) : error BC30451: Name 'InStr'
is not declared.
If InStr(1, strTempString, "TT") <> 0 Then
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(217) : error BC30451: Name 'InStr'
is not declared.
ElseIf InStr(1, strTempString, "NOPAD") <> 0 Then
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(218) : error BC30451: Name 'InStr'
is not declared.
ElseIf InStr(1, strTempString, "Item") <> 0 Then
~~~~~
----------------------------------------------------------------------------------------------
And I've no idea how to perform an IDE compilation. I tried to copy the exe
from the /bin directory to another location to run but received error message
stating that
The dynamic link library mscoree.dll could not be found in the specified path
I:\OEAutomationlog;.;C:\WINNT\System32;C:\WINNT\System;C:\WINNT;C:\WINNT\System32;C:\WINNT\System32\Wbem
Can anybody please help me or guide me on this?
Many thanks in advance.
I've completed my console application and now wants to compile the
application and an executable file to be run at another location. However,
I've tried compiling that program in the command prompt with the following
command :
vbc Module1.vb /out:OEAutomation.exe /t:exe
I received a lot of error messages.
-------------------------------------------------------------------------------------------
D:\OEAutomation\OEAutomation\Module1.vb(3) : error BC30466: Namespace or
type 'Mail' for the Imports 'System.Web.Mail' cannot be
Imports System.Web.Mail
~~~~~~~~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(8) : error BC30002: Type 'SmtpMail'
is not defined.
Public smtp As SmtpMail
~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(9) : error BC30002: Type
'MailMessage' is not defined.
Public msgOELog As MailMessage = New MailMessage()
~~~~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(23) : error BC30002: Type 'clsFTP'
is not defined.
Dim ff As clsFTP
~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(24) : error BC30002: Type 'SmtpMail'
is not defined.
Dim smtpErrorToIT As SmtpMail
~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(25) : error BC30002: Type
'MailMessage' is not defined.
Dim msgErrorMailToIT As MailMessage = New MailMessage()
~~~~~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(27) : error BC30451: Name 'Today' is
not declared.
dtCurrentDate = Today
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(28) : error BC30451: Name 'Weekday'
is not declared.
If Weekday(dtCurrentDate) = 2 Then
~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(35) : error BC30451: Name 'Month' is
not declared.
strOEYesterdayLogFilename = "eoe" & Month(dtPreviousDate) &
Day(dtPreviousDate) & ".txt"
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(35) : error BC30451: Name 'Day' is
not declared.
strOEYesterdayLogFilename = "eoe" & Month(dtPreviousDate) &
Day(dtPreviousDate) & ".txt"
~~~
D:\OEAutomation\OEAutomation\Module1.vb(36) : error BC30451: Name 'Month' is
not declared.
strOETodayLogFilename = "eoe" & Month(dtCurrentDate) &
Day(dtCurrentDate) & ".txt"
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(36) : error BC30451: Name 'Day' is
not declared.
strOETodayLogFilename = "eoe" & Month(dtCurrentDate) &
Day(dtCurrentDate) & ".txt"
~~~
D:\OEAutomation\OEAutomation\Module1.vb(49) : error BC30451: Name 'vbLf' is
not declared.
msgOELog.Body = "Dear All," & vbLf & vbLf
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(49) : error BC30451: Name 'vbLf' is
not declared.
msgOELog.Body = "Dear All," & vbLf & vbLf
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(57) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Started")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(61) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Started")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(68) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Old Log Rename Successfully")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(72) : error BC30451: Name 'Now' is
not declared.
objOutputLogFile.WriteLine(Now() & " Yesterday Old Log Rename
Successfully")
~~~
D:\OEAutomation\OEAutomation\Module1.vb(76) : error BC30002: Type 'clsFTP'
is not defined.
ff = New clsFTP()
~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(119) : error BC30451: Name 'vbCrLf'
is not declared.
objOutputLogFile.WriteLine("Specific Error=" & ex.Message +
vbCrLf)
~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(131) : error BC30451: Name 'Hour' is
not declared.
If Hour(Now()) = 9 Then
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(131) : error BC30451: Name 'Now' is
not declared.
If Hour(Now()) = 9 Then
~~~
D:\OEAutomation\OEAutomation\Module1.vb(149) : error BC30451: Name 'Hour' is
not declared.
If Hour(Now()) = 15 Then
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(149) : error BC30451: Name 'Now' is
not declared.
If Hour(Now()) = 15 Then
~~~
D:\OEAutomation\OEAutomation\Module1.vb(183) : error BC30451: Name 'vbLf' is
not declared.
msgOELog.Body = msgOELog.Body & dtDate & vbLf
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(198) : error BC30451: Name 'Replace'
is not declared.
arrFileContent(lngCounter) = Replace(arrFileContent(lngCounter),
strPipe, "|")
~~~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(207) : error BC30451: Name 'Len' is
not declared.
If Len(strTempString) = 0 Then
~~~
D:\OEAutomation\OEAutomation\Module1.vb(215) : error BC30451: Name 'Trim' is
not declared.
strTempString = Trim(strTempString)
~~~~
D:\OEAutomation\OEAutomation\Module1.vb(216) : error BC30451: Name 'InStr'
is not declared.
If InStr(1, strTempString, "TT") <> 0 Then
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(217) : error BC30451: Name 'InStr'
is not declared.
ElseIf InStr(1, strTempString, "NOPAD") <> 0 Then
~~~~~
D:\OEAutomation\OEAutomation\Module1.vb(218) : error BC30451: Name 'InStr'
is not declared.
ElseIf InStr(1, strTempString, "Item") <> 0 Then
~~~~~
----------------------------------------------------------------------------------------------
And I've no idea how to perform an IDE compilation. I tried to copy the exe
from the /bin directory to another location to run but received error message
stating that
The dynamic link library mscoree.dll could not be found in the specified path
I:\OEAutomationlog;.;C:\WINNT\System32;C:\WINNT\System;C:\WINNT;C:\WINNT\System32;C:\WINNT\System32\Wbem
Can anybody please help me or guide me on this?
Many thanks in advance.