none
Method 'A' in type 'XY' from assembly 'Z' does not have an implementation Problem RRS feed

  • Question

  • I hope this is in the correct forum and I am hoping someone out there might be able to help me with this issue. I have searched the web for an answer but have found nothing that exactly matches my scenario.

    The History :
    We have a (very complicated) application which is currently built with .NET 2.0 and we are trying to convert to 3.5 using VS2010 Beta2 so that we can take advantage of all that the new technologies can bring to us. However, we are having to weed out a large number of issues which has so far gone successfully until this litle gem popped up on my screen.

    The Problem:

    The Building of the CustomInterfaces.dll and ANameSpace.dll assemblies builds successfully and Reflector.exe builds successfully as well. A Post Build Event of the GHI.csproj occurs where the CustomReflector.exe is executed with the ANameSpace.dll being passed as an argument. When the MyReflector.GetTypes method receives the ANameSpace.dll as the assemblyPath when we are building in VS2010 this code completes without any issues however when this is carried out on our TFS 2010 Build server the Assembly.GetTypes throws an Exception located within the ReflectionTypeLoadException as follows "Method 'ExecuteSSISPackage' in type 'ANamespace.SSISProcessController' from assembly 'ANamespace' does not have an implementation. "

    Using ILDASM I have been able to determine from the ANamespace.dll it does have under the ANamespace.SSISProcessController the following:
    implements[CustomInterfaces]CustomInterfaces.IExecuteSSISPackage

    Can anyone help as this slight bump in the road is turning into a mountain.

    The Code:


    We have an Interface in IMyInterface.cs as per below in project DEF.csproj which is within the solution ABC.sln:

    using System;
    using System.ServiceModel;
    using Microsoft.SqlServer.Dts.Runtime;

    namespace CustomInterfaces
    {
        [ServiceContract]
        public interface IExecuteSSISPackage
        {
            [OperationContract]
            DTSExecResult ExecuteSSISPackage( int param1, string param2, string param3, string param4, string param5, string param6 );
        }
    }


    We have a class in SSISProcessController.cs as per below in project GHI.csproj which is within the solution ABC.sln and has the CustomInterfaces assembly referenced within the project:

    using System;
    using System.ServiceModel;
    using Microsoft.SqlServer.Dts.Runtime;
    using CustomInterfaces;

    using SSISApplication = Microsoft.SqlServer.Dts.Runtime.Application;

    namespace ANamespace
    {
        public class SSISProcessController : IExecuteSSISPackage
        {
            public DTSExecResult ExecuteSSISPackage( int param1, string param2, string param3, string param4, string param5, string param6 )
            {
            }
        }
    }

    We have a another class in Reflector.cs as per below in solution XYZ.sln:

    using System;
    using System.Reflection;
    using Microsoft.SqlServer.Dts.Runtime;

    namespace CustomReflector
    {
        internal class MyReflector
        {
            public static Type[] GetTypes(string assemblyPath)
            {
                Type[] t;
                try
                {
                    Assembly assembly = Assembly.LoadFrom(assemblyPath);
                    t = assembly.GetTypes();
                    return t;
                }
                catch (ReflectionTypeLoadException ex)// ReflectionTypeLoadException)
                {
                    foreach(Exception e in ex.LoaderExceptions)
                    {
                        Console.WriteLine(e.Message);
                    }
                    throw ex;
                }
            }
        }
    }
    Tuesday, January 12, 2010 9:30 PM

Answers

  • What i had to do to get my build to execute Reflector.exe and not fail was to install VS2008 SDK Tools to the TFS Build server which put the DLLS into the GAC that the assembly Microsoft.SqlServer.Dts.Runtime depends upon. As soon as this was installed the build completed with no issues.
    • Marked as answer by Madmaximillion Tuesday, January 19, 2010 1:45 PM
    Tuesday, January 19, 2010 1:45 PM

All replies

  • Hi Madmaximillion,

    This error message should indicate a missing dependent assembly. For example, one .NET application is referencing assembly A.  Assembly A also refers to assembly B.  This .NET application does not have a reference to assembly B.  However the application is using a class/method that exposes some type from assembly B to your code. Therefore we must include a reference to this assembly B in addition to assembly A.  In general when you add references, the IDE will pick these up for you. However it doesn't do in all cases. In this situation we need to follow the dependency chain and figure out what is missing and where it resides to fix this question.

    About how to configure VS TFS 2010 server, please go to Microsoft Visual Studio Team Foundation Server 2010 Beta 2 forum for better helps. There are many TFS server experts in that forum.
    http://social.msdn.microsoft.com/Forums/en-US/tfsprerelease/threads

    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by SamAgain Monday, January 18, 2010 11:16 AM
    • Marked as answer by Riquel_DongModerator Tuesday, January 19, 2010 2:16 AM
    • Unmarked as answer by Madmaximillion Tuesday, January 19, 2010 1:46 PM
    Wednesday, January 13, 2010 6:45 AM
    Moderator
  • What i had to do to get my build to execute Reflector.exe and not fail was to install VS2008 SDK Tools to the TFS Build server which put the DLLS into the GAC that the assembly Microsoft.SqlServer.Dts.Runtime depends upon. As soon as this was installed the build completed with no issues.
    • Marked as answer by Madmaximillion Tuesday, January 19, 2010 1:45 PM
    Tuesday, January 19, 2010 1:45 PM