Microsoft provided .dll issue cannot be referenced RRS feed

  • Question

  • One of our Legacy Application was using 'Microsoft.Exchange.WebServices.dll' provided by Microsoft.
    It was using Version and RunTime Version was v2.0.50727 which is Strongly Named.

    I am upgrading this Application, and using VS2015 referenced the same .dll 'Microsoft.Exchange.WebServices.dll'.
    When I deployed and was testing the Application, I get the Exception as : 
    Inner exception: The specified object was not found in the store.

    I made sure this .dll was GAC'ed but the weird part is instead of GACing under the location 'C:\Windows\Microsoft.NET\assembly\GAC_MSIL\...'
    it is by default getting GAC'ed under 'C:\Windows\assembly\...'

    How can I resolve this issue ? I am using .Net Framework 4.6, VS2015


    Tuesday, October 29, 2019 7:10 PM

All replies

  • "The specified object was not found in the store." seems to be an error from Exchange,
    and is not the error for a missing assembly.

    as for the directory: 
    Starting with the .NET Framework 4, the default location for the Global Assembly Cache is %windir%\Microsoft.NET\assembly. In earlier versions of the .NET Framework, the default location is %windir%\assembly.
    see Global Assembly Cache
    So when the assembly was build against .NET 2.0, the path the assembly is correct.

    Tuesday, October 29, 2019 7:39 PM
  • as the Runtime version is 2.0.50727, and I am using VS2015 with .net Framework 4.5x.

    1) So, on referencing older version .dll  to my latest .net Framework version do you think it will still work ?

    2) All my project .dlls are referencing 'C:\Windows\Microsoft.NET\assembly\GAC_MSIL\...'

    As only this old version dll is GACed into %windir%\assembly will there be any issue when moving to Prod environment ?

    3) How can I uninstall the .dll from  %windir%\assembly directory ?


    Tuesday, October 29, 2019 7:51 PM
  • 1) the assembly was build for old .NET, but can be used in 4.5. Yes, this works.
    2) you mean: when referencing assemblies build against current .Net framework 4.x
    3) gacutil /u 
    Tuesday, October 29, 2019 8:23 PM
  • or point 2 :

    I mean the referenced assembly needs to be in GAC right for the application to work. As this 'Microsoft.Exchange.WebServices.dll'  Runtime version is 2.0.50727 will be under %windir%\assembly directory will it automatically recognize the GAC'ed dll for new .Net framework. Hope I am making sense

    Point 3:

    I opened command prompt as admin and run below query and receiving following error :

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools>gacutil.exe /u "C:\Windows\assembly\Microsoft.Exchange.WebServices.dll"

    Failure removing assembly from cache: Invalid file or assembly name.  The name of the file must be the name of the assembly plus .dll or .exe .


    • Edited by Dan2890 Tuesday, October 29, 2019 8:50 PM a
    Tuesday, October 29, 2019 8:49 PM
  • Point 2: yes it should be found. From the error message you got, I guess it is already been found.
    But why don't you install the assembly side by side instead of into the GAC?
    Point 3: read the manual: Gacutil.exe (Global Assembly Cache Tool)
    ut isn't the error message clear enough? It expects a file name, not a complete path.

    Tuesday, October 29, 2019 9:04 PM
  • Point 2: I did not understand what you mean by install the assembly side by side ?

    Also, I dont understand the error. I called the method of which it is expecting parameters. I passed the paramters accordingly. But it says Object not found in store. Dont understand

    Inner exception: The specified object was not found in the store.

    Point 3 : I was able to uninstall. Thanks for this

    Please advise point 2 will appreciate it


    Tuesday, October 29, 2019 9:14 PM
  • Point 2: install in the same directory as your .exe.

    As for the error: WHAT method are you calling with WHAT parameters. You have the permissions on the exchange server?

    Wednesday, October 30, 2019 4:08 AM