Click here to Skip to main content
15,885,842 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I have created one application of Lync SDK using dlls

Microsoft.Lync.Controls.dll
Microsoft.Lync.Model.dll
Microsoft.Lync.Utilities.dll
Microsoft.Lync.Controls.Framework.dll
Microsoft.Lync.Controls.Design.dll

All these dlls are copied into bin folder, application is working fine but some machine have same dlls into gac folder my application is not working on that machine and getting error as below

System.MissingMethodException: Method not found: 'Microsoft.Lync.Model.LyncClient Microsoft.Lync.Model.LyncClient.GetClient()'.    at MitelPlugin.Helper.LyncHelper.get_LyncObj()    at MitelPlugin.App..ctor()

I have added following details into config file to enforce to use local assembly but issue is still not resolved 
Please let me know if any other approach (I don’t have option to remove dll from gac)?

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
	 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">		
		<dependentAssembly>
			<assemblyIdentity name="Microsoft.Lync.Controls.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Controls.dll" />
			<assemblyIdentity name="Microsoft.Lync.Controls.Framework.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Controls.Framework.dll" />
			<assemblyIdentity name="Microsoft.Lync.Model.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Model.dll" />
			<assemblyIdentity name="Microsoft.Lync.Utilities.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Utilities.dll" />
			<assemblyIdentity name="Microsoft.Office.Uc.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.4454.1509" href="~\Microsoft.Office.Uc.dll" />
		</dependentAssembly>
      <probing privatePath="Skins"/>
    </assemblyBinding>
  </runtime>


What I have tried:

I have added following details into config file to enforce to use local assembly but issue is still not resolved 
Please let me know if any other approach (I don’t have option to remove dll from gac)?

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
	 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">		
		<dependentAssembly>
			<assemblyIdentity name="Microsoft.Lync.Controls.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Controls.dll" />
			<assemblyIdentity name="Microsoft.Lync.Controls.Framework.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Controls.Framework.dll" />
			<assemblyIdentity name="Microsoft.Lync.Model.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Model.dll" />
			<assemblyIdentity name="Microsoft.Lync.Utilities.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.0.0" href="~\Microsoft.Lync.Utilities.dll" />
			<assemblyIdentity name="Microsoft.Office.Uc.dll" PublicKeyToken="71e9bce111e9429c" />
			<codebase version="15.0.4454.1509" href="~\Microsoft.Office.Uc.dll" />
		</dependentAssembly>
      <probing privatePath="Skins"/>
    </assemblyBinding>
  </runtime>
Posted
Comments
Kornfeld Eliyahu Peter 30-Jul-18 3:07am    
GetClient() is a static method! How do you call it?
Ganesh_verma 30-Jul-18 8:10am    
I have created the instance as below
private static volatile LyncClient lyncObj;
        /// <summary>   The lock. 
 internal static readonly object _lock = new object();

public static LyncClient LyncObj
        {
            get
            {
                if (lyncObj == null)
                {
                    lock (_lock)
                    {
                        if (lyncObj == null)
                        {
                            while (!WaitForLyncStart())
                            {
                                Thread.Sleep(1000);
                            }
                            lyncObj = LyncClient.GetClient();
                        }
                    }
                }
                return lyncObj;
            }
        }
Ganesh_verma 30-Jul-18 8:11am    
this is working fine if same dll not available into gac folder of machine

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900