Please use the ADX loader as a shim for your ADX project.

Add-in Express™ Support Service
That's what is more important than anything else

Please use the ADX loader as a shim for your ADX project.
 
Jack Bretcher




Posts: 189
Joined: 2006-06-30
I migrated my application to 200007, now I cannot get the shim to correctly compile http://www.add-in-express.com/forum/read.php?FID=5&TID=2004.

I was looking through the warnings and noticed:
Warning 2 'Public Property ShimProgID() As String' is obsolete: 'The 'ShimProgID' property is deprecated in the current ADX version. Please use the ADX loader as a shim for your ADX project.'

How do I do this?

Jack
Posted 21 Mar, 2007 17:51:42 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Jack,
please read the following article:
http://www.add-in-express.com/creating-addins-blog/2006/08/04/shim-loader-mscoree/


P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 22 Mar, 2007 07:44:13 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
Is it preferred to use the loader vs the shim?

Jack
Posted 22 Mar, 2007 14:11:59 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
Also, how do you determine the PublicKeyToken for an InstallShield project?

Jack
Posted 22 Mar, 2007 16:56:32 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jack.

Is it preferred to use the loader vs the shim?

Yes.

Also, how do you determine the PublicKeyToken for an InstallShield project?

Do you mean a PublicKeyToken of a .NET assembly?
Posted 23 Mar, 2007 11:24:39 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
Yes, the document states "The name attribute of the assemblyIdentity node includes the name of you add-in assembly (without ?Â?Ð?è.dll?Â?Ð?é) and PublicKeyToken of your add-in assembly. The latter can be found in the setup project (that must be already built) - click on your add-in primary output in the setup projects and, in the Properties window, expand the KeyOutput property and see the PublicKeyToken property value."

However, I am using InstallShield and there is not a properties that has the PublicKeyToken.

Jack
Posted 23 Mar, 2007 12:20:24 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Jack, you can use the sn.exe tool to extract the PublicKeyToken from the .snk file (see the MSDN help).

sn.exe -p infile outfile
sn.exe -t infile
Posted 23 Mar, 2007 12:27:55 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
Thanks for the info on sn.exe; I did find the PublicKeyToken. However when it attempts to load it seems to fail, see the lines from the log below. I also included the manifest below the error for reference.

Help.....

13:29:59 380 Seraching fo the 'name' attribute of the 'assemblyIdentity' element.
13:29:59 380 Success. The name is 'GEBRE,PublicKeyToken=9f6f2d0ddc7cda0d'.
13:29:59 380 Calling the managed procedure to register the 'GEBRE,PublicKeyToken=9f6f2d0ddc7cda0d' assembly.
13:29:59 980 Connecting to the application domain of the ADX loader.
13:29:59 980 Success.
13:29:59 980 Loading the 'GEBRE,PublicKeyToken=9f6f2d0ddc7cda0d' assembly.
13:29:59 980 Error: The ADX Loader can't resolve the 'GEBRE, PublicKeyToken=9f6f2d0ddc7cda0d' assembly. Please check if the assembly exists in the application directory or in the GAC.
13:29:59 980 Error: Could not load file or assembly 'GEBRE, PublicKeyToken=9f6f2d0ddc7cda0d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
13:29:59 980 The managed registration process is complete with HRESULT = 2.
13:29:59 380 The add-in registration process is complete with HRESULT = 2.


Manifest:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<assemblyIdentity name="GEBRE,PublicKeyToken=9f6f2d0ddc7cda0d"/>
<loaderSettings generateLogFile="true"/>
</configuration>

Posted 23 Mar, 2007 13:51:02 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jack.

1. Didn't you change the name of the add-in assembly?
2. Does the PublicKeyToken of the .snk file correspond to the PublicKeyToken in the loader manifest? Please examine the adxloader.dll.manifest file in the add-in target directory when the error appears during the installation process.
Posted 25 Mar, 2007 08:06:05 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
I did not change the Addin's name, it is shown: www.aaoutlook.com/aa/AddinAssembly.gif
did I need to????

The extract from the snk file is below.

C:\Program Files\Microsoft Visual Studio 8\VC>sn.exe -p "C:\Development\Consulting\Grubb and Ellis - BRE Commercial\GEBRE\GEBRE\GEBRE.snk" "C:\Development\Consulting\Grubb and Ellis - BRE Commercial\GEBRE\GEBRE\GEBRE.Out"

Microsoft ® .NET Framework Strong Name Utility Version 2.0.50727.42
Copyright © Microsoft Corporation. All rights reserved.

Public key written to C:\Development\Consulting\Grubb and Ellis - BRE Commercial\GEBRE\GEBRE\GEBRE.Out

C:\Program Files\Microsoft Visual Studio 8\VC>sn.exe -t "C:\Development\Consulting\Grubb and Ellis - BRE Commercial\GEBRE\GEBRE\GEBRE.Out"

Microsoft ® .NET Framework Strong Name Utility Version 2.0.50727.42
Copyright © Microsoft Corporation. All rights reserved.

Public key token is 9f6f2d0ddc7cda0d

Posted 26 Mar, 2007 09:06:47 Top