Domanda

ho pubblicato un articolo qui ( Come faccio a impostare le autorizzazioni per la mia prospettiva VSTO add-in? ) e sono stato in grado di costruire il mio programma di installazione. Ho pensato che una volta che il programma di installazione si è costruita, tutto avrebbe funzionato bene.

mi sbagliavo. Funziona su circa la metà del PC Ho eseguito il programma di installazione. Il mio problema è che l'altra metà non funziona. Sto cercando di installare un componente aggiuntivo per Outlook di Office 2003.

Sono spinti fino a creare i passi manualmente utilizzando un file batch. Nulla sembra di lavorare su questi PC e non riesco a trovare un denominatore comune che posso escludere o che renderà il lavoro VSTO Addin.

Ecco il file batch che sto usando. Che cosa sto facendo / non-fare di sbagliato in questo?

Io ho usato realmente l'aiuto di un esperto di VSTO. Grazie !!!!

Modifica impostazioni Ho cambiato il file batch e del Registro di sistema per riflettere gli aggiornamenti più recenti a loro. Ho anche attaccato il testo di errore che viene dal PC che non funzionano.

@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

Ho preso le impostazioni del Registro (indicati nel file batch sopra) direttamente da un PC che questa applicazione ha lavorato su. Le impostazioni del Registro di VSTO che sto usando sono:

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'errore che ottengo è:

  

Impossibile caricare il file o l'assembly 'Microsoft.Office.Interop.Outlook, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c' o una delle sue dipendenze. Il sistema non riesce a trovare il file specificato.

************** 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
----------------------------------------
È stato utile?

Soluzione

Ok, quindi a quanto pare l'AddIn viene automaticamente disattivata per Outlook. Un'altra risposta, con una ripresa leggermente diversa:

Vai su Start -> Pannello di controllo -> Sistema -> Avanzate -> Ambiente Variabili -> Variabili di sistema e aggiungere VSTO_SUPPRESSDISPLAYALERTS con un valore pari a 0. Questo visualizzerà i messaggi di errore sullo schermo, in contrasto con la disattivazione in silenzio il VSTO. Se si preferisce avere un registro su disco, aggiungere VSTO_LOGALERTS e impostarlo su 1.

Speriamo che questo vi fornirà qualche dettaglio in più che potrebbe aiutarci a risolvere il tuo problema!

Altri suggerimenti

Per iniziare con qualcosa di banale: al di dove le cose non hanno funzionato, avete controllato il registro per vedere se tutte le voci sono state correttamente aggiunti PC? Per esempio, ha fatto il file .bat ottenere eseguito con un account che in realtà è permesso scrivendo a HKEY_CLASSES_ROOT?

Sono uno di quelli di PC con Vista? Potrebbe essere che sono in esecuzione della suite Office, senza UAC, o con un account amministratore completo? In tal caso, le voci devono essere aggiunti al HKEY_LOCAL_MACHINE.

Modifica

Ok, se sei sicuro che le cose vengono aggiunti al Registro di sistema correttamente, prossimo è Baku (o ProcMon se lo preferite). Accendi regmon, avviare l'applicazione host ufficio, e vedere dove si trova e non cerca il componente aggiuntivo VSTO. Inizia con un filtro basato sul componente aggiuntivo nome, poi allargarsi verso l'alto o restringere a seconda della quantità di dati.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top