migrating SSIS from 2005 to 2008

I have script task in a package. It works fine on SQL2005. It doesn't work on SQL 2008. It does not give error message, just can not find the file.This is the code:

Imports System
Imports System.Data
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

      Public Sub Main()

        If System.IO.File.Exists(Dts.Variables("FilePath").Value.ToString()) Then
            Dts.Variables("FileExists").Value = True
        Else
            Dts.Variables("FileExists").Value = False
        End If
        Dts.TaskResult = Dts.Results.Success
      
End Sub

End Class
Any ideas what could be the problem ?

Thank you
LVL 1
crcsupportAsked:
Who is Participating?
 
TempDBAConnect With a Mentor Commented:
What happens when you run it manually?
0
 
venk_rConnect With a Mentor Commented:
I think you might need to download DTS Run time librabries from microsoft for backward compatibility as sql 2008 doesnt support it anymore.

http://msdn.microsoft.com/en-us/library/ms143755(v=sql.105).aspx
0
 
Anthony PerkinsConnect With a Mentor Commented:
venk_r,

The author is using SSIS not DTS.
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
venk_rConnect With a Mentor Commented:
asperkins,
Im sorry . I missed that .

crcsupport,
Please try using
namespace System.IO
and see if it works.
0
 
Alpesh PatelConnect With a Mentor Assistant ConsultantCommented:
For that Just Open script task and Script editor and close it. It will resolve your issue.
0
 
Anthony PerkinsCommented:
Please do.  There is nothing relevant here at all.

Anthony
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.