Question

J'ai posté un article ici ( Comment dois-je définir des autorisations sur mes perspectives VSTO add-in? ) et j'ai pu construire mon installateur. Je pensais qu'une fois le programme d'installation se construit, tout allait bien.

Je me suis trompé. Il fonctionne sur environ la moitié, j'ai couru le programme d'installation de l'ordinateur sous tension. Mon problème est que l'autre moitié ne fonctionne pas. Je suis en train d'installer un add-in pour Office Outlook 2003.

Je suis même allé jusqu'à créer les étapes manuellement à l'aide d'un fichier batch. Rien ne semble fonctionner sur ces PC et je ne peux pas trouver un dénominateur commun que je peux exclure ou qui fera le travail VSTO Addin.

Voici le fichier batch que je utilise. Qu'est-ce que je fais / sans faire de mal à cela?

Je pourrais vraiment utiliser l'aide d'un expert VSTO. Merci !!!!

EDIT J'ai changé le fichier de commandes et les paramètres du Registre pour tenir compte des mises à jour récentes pour eux. Je suis également attaché le texte d'erreur qui provient des PC qui ne fonctionnent pas.

@echo off

echo Installing Visual Studio for Office Runtime (SE 2005)...
..\VSTO\vstor.exe

echo Creating Directories...
mkdir "c:\program files\Project Archiver"

echo Installying Add-In... 
echo Copying files...
xcopy /Y *.dll "c:\program files\Project Archiver"
xcopy /Y *.manifest "c:\program files\Project Archiver"

echo Setting Security...
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe" -polchgprompt off
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe" -u -ag All_Code -url "c:\program files\Project Archiver\ProjectArchiver.dll" FullTrust -n "Project Archiver" -d "Outlook plugin for archiving"
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe" -u -ag All_Code -url "c:\program files\Project Archiver\Microsoft.Office.Interop.SmartTags.dll" FullTrust -n "Project Archiver" -d "Outlook plugin for archiving"
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe" -polchgprompt on

echo Loading Registry Values...
"c:\program files\Project Archiver\VSTO_settings.reg"

echo "That should do it."
pause

Je pris les paramètres du Registre (mentionné dans le fichier batch ci-dessus) directement à partir d'un PC que cette application a travaillé. Les paramètres du Registre VSTO J'utilise sont:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ProjectArchiver\CLSID]
@="{27830B8D-F7A1-4945-AC4A-47661B9ED36D}"

[HKEY_CLASSES_ROOT\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}]
@="ProjectArchiver -- an addin created with VSTO technology"

[HKEY_CLASSES_ROOT\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,00,72,\
  00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,4d,00,69,00,63,00,\
  72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,68,00,61,00,72,00,65,00,64,\
  00,5c,00,56,00,53,00,54,00,4f,00,5c,00,38,00,2e,00,30,00,5c,00,41,00,64,00,\
  64,00,69,00,6e,00,4c,00,6f,00,61,00,64,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
  00,00,00
"ManifestName"="ProjectArchiver.dll.manifest"
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Program Files\\Project Archiver\\"

[HKEY_CLASSES_ROOT\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\ProgID]
@="ProjectArchiver"

[HKEY_CLASSES_ROOT\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\Programmable]

[HKEY_CLASSES_ROOT\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\VersionIndependentProgID]
@="ProjectArchiver"

[HKEY_CLASSES_ROOT\ProjectArchiver]
@=""





[HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}]
@="ProjectArchiver -- an addin created with VSTO technology"

[HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\InprocServer32]
@=hex(2):25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,00,72,00,6f,00,67,00,72,\
  00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,5c,00,4d,00,69,00,63,00,\
  72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,68,00,61,00,72,00,65,00,64,\
  00,5c,00,56,00,53,00,54,00,4f,00,5c,00,38,00,2e,00,30,00,5c,00,41,00,64,00,\
  64,00,69,00,6e,00,4c,00,6f,00,61,00,64,00,65,00,72,00,2e,00,64,00,6c,00,6c,\
  00,00,00
"ManifestName"="ProjectArchiver.dll.manifest"
"ThreadingModel"="Both"
"ManifestLocation"="C:\\Program Files\\Project Archiver\\"

[HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\ProgID]
@="ProjectArchiver"

[HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\Programmable]

[HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{27830B8D-F7A1-4945-AC4A-47661B9ED36D}\VersionIndependentProgID]
@="ProjectArchiver"

[HKEY_LOCAL_MACHINE\Software\Classes\ProjectArchiver]
@=""

[HKEY_LOCAL_MACHINE\Software\Classes\ProjectArchiver\CLSID]
@="{27830B8D-F7A1-4945-AC4A-47661B9ED36D}"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\Addins\ProjectArchiver]
"Manifest"="C:\\Program Files\\Project Archiver\\ProjectArchiver.dll.manifest"
"LoadBehavior"=dword:00000003
"FriendlyName"="ProjectArchiver"
"Description"="ProjectArchiver -- an addin created with VSTO technology"
"CommandLineSafe"=dword:00000001

L'erreur que je reçois est:

  

Impossible de charger le fichier ou l'assembly 'Microsoft.Office.Interop.Outlook, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c' ou une de ses dépendances. Le système ne peut pas trouver le fichier spécifié.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Outlook, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.Interop.Outlook, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at ProjectArchiver.ThisAddIn.Initialize()
   at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.CreateStartupObject(EntryPoint entryPoint, Dependency dependency, Assembly objectAssembly)
   at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain()
   at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider serviceProvider)
   at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadEntryPointsHelper(IHostServiceProvider serviceProvider)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.816
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
Microsoft.Office.Tools.Common
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.816
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
ProjectArchiver
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/Callidus/Project%20Archiver/ProjectArchiver.DLL
----------------------------------------
Était-ce utile?

La solution

Ok, donc apparemment le AddIn se désactive automatiquement par Outlook. Une autre réponse avec une légèrement différente:

Allez dans Démarrer -> Panneau de configuration -> Système -> Avancé -> Environnement Variables -> Variables système et ajouter VSTO_SUPPRESSDISPLAYALERTS avec une valeur de 0. Cela permet d'afficher des messages d'erreur à l'écran, par opposition à la désactivation de silence VSTO. Si vous préférez avoir un journal sur le disque, ajouter VSTO_LOGALERTS et le mettre à 1.

Espérons que cela vous fournir quelques détails supplémentaires qui pourraient nous aider à résoudre votre problème!

Autres conseils

Pour commencer quelque chose de trivial: l'endroit où les PC les choses ne fonctionnent pas, avez-vous vérifié le registre pour voir si toutes les entrées ont été ajoutées correctement? Par exemple, le fichier .bat ne s'exécuter sous un compte qui est effectivement autorisé par écrit à HKEY_CLASSES_ROOT?

Est-ce que de Vista en cours d'exécution de ces PC? Se pourrait-il qu'ils sont en cours d'exécution de la suite Office sans contrôle de compte, ou avec un compte administrateur complet? Dans ce cas, les entrées doivent être ajoutées à la HKEY_LOCAL_MACHINE.

Modifier

Ok, si vous êtes sûr que les choses sont ajoutés au Registre correctement, next up est

scroll top