Monday, March 19, 2012

How to Reuse functions in script tasks ?

Hello

I have some common functions that i use in several script tasks. How du i store a function globaly so that i can use it from different projects and still only have to edit it one place ?

I think one way is to create a dll of the function and import in each of your script tasks. To Import the dll into each of the script you need to place the dll into <root>\Windows\Microsoft .Net\Framework\<Latest Version> and gac it.

I think this will help...

Thanks

Dharmbir

|||But when i import it, it will become "local" ? So if i want to change something in the function i'll have to import it again in all those scripts ?|||

Correct.

I am not able to think of any other way to do the same.

Because each script task is different Identity(different project), if you create a function into one ...the other script task will not be aware of it.

How do you share a global function b/w two different projects?

Thanks

Dharmbir

|||

You don't have to import in each of your script...

once u do changes copy to the <root>\microsoft.net\.... folder again and just gac it...

It should work

No comments:

Post a Comment