Using custom assembly problem. Help!

I've created C# assembly which was included into Script Task code as following:
--------------------
Imports DTX55AppDefaults.DTX55ApDefaults
---------------------

The ScriptMain window recognize this assembly and can see all methods with no problem.
The class View window see the assembly with whole list of methods with no problems.

I build the code when ScriptMain window was open and save the code.

Then I close window and run the package in Debug mode.

Debuger throw out exception :

"Error: The script threw and exception: Could not load file assembly 'DTX55AppDefaults, Version=1.0.0.0,Culture=neutral,PublicKeyToken=null' or one of its dependencies. The system can not find the file specified."

Even if I comment all code inside the Script Task except "Import" clause it give me that error.

The assembly successfully used by another C# projects.
The assemply is visible inside ScriptTask developer environment.

Any ideas what's wrong will be greately appreciated, because I am really stuck with it.

Thank you,
Vitaliy





Answer this question

Using custom assembly problem. Help!

  • corner22

    PS: It is not possibel to copy a file in the windows\assembly directory!

    Loom


  • the_evil_one

    As Simon says, the assembly also needs to be in GAC -
    drag the assembly to \windows\assembly\
    or install it with installutil.exe (included with .NET SDK and VS).


  • Opher535

    Have you tried copying the file to the c:\windows\assembly folder

  • Henri KONSTAIN

    Have you registered the component in the GAC if not where have you put the component

    I assume you added a reference to the assembly in your script task.

  • Jimmyh

    I have the same problem: In VSA the assemblies works fine. I can see all the classes.

    But when I execute the SSIS-Package a get the error:....file not found.

    I have copied the *.dll to :

    C:\Programme\Microsoft SQL Server\90\SDK\Assemblies\

    C:\windows\Microsoft.Net\Framework\V2.0.50727\

    and then I haved tried to use installutil.exe

    c:\d\installutil.exe c:\Programme\microsoft SQL server\90\SDK\Assemblies\mc.dll

    Installutil cannot find the DLL

    Have someone an example for using the installutil.exe

    In the Scripting-Book of Donald Farmer is an example with an existing DLL. But there is no example for using the installutil.exe.

    Loom


  • JpDev

    Thanks Simon,

    but the problem is still there.

    You are right, the gacutil is the right tool.

    I have no problem to use this global assembly in any other VB.Net program.

    I have only to add a reference to the project and the programm works fine.

    But where is the cookbook for SSIS-packages


  • David Priddle

    I put my *.dll to the \\WINDOWS\Microsoft.NET\Framework..\ folder

    (I am sorry, I am not in front of my work computer now,so can not type exact name of Framework folder).

    Rgrds,
    Vitaliy


  • JHagan

    Thank you! It  works!

    Vitaliy

  • ThoWa

    Shouldn't that be gacutil rather than installutil



  • Using custom assembly problem. Help!