2012-01-13 133 views
2

我們使用Windows Installer/MSI 而不是 ClickOnce。如何設置VSTO 4.0先決條件?

我們沿用了國家對我們的 VSTO的Outlook加載項創建一個Windows Installer這個詳細的Microsoft文章:

Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer

這很好,但總是與這些長期的,複雜的,詳細的腳本安裝說明有問題了解什麼是安全的,以適應我們自己的情況。

在我們的案例中,我們使用的是VS2010和VSTO4,說明適用於VSTO3。所以我們使用這些指令創建的啓動器會抱怨缺少的VSTO3。

我們需要改變什麼?我們爲VSTO4插入什麼?以下是文章的相關摘要:

6. In the Properties window, perform the following tasks. 
    a) Set the value of (Name) to Search for VSTO 3.0 Runtime. 
    b) Change the value of Property to VSTORUNTIME. 
    c) Set the value of RegKey to Software\Microsoft\vsto runtime Setup\v9.0.21022 
    d) Leave the Root property set to vsdrrHKLM. 
    e) Change the Value property to Install. 

7. In the Launch Conditions(ExcelAddInSetup) editor, select the Condition1 launch condition, right-click the condition and select Properties Window. 

8. In the Properties window, perform the following tasks. 
    a) Set (Name) to Verify VSTO 3.0 Runtime availability. 
    b) Change the value of the Condition property to the following VSTORUNTIME = "#1" 
    c) Leave the InstallURL property blank. 
    d) Change the value of the Message property to The Visual Studio Tools for Office 3.0 Runtime is not installed. Please run Setup.exe. 

正是這種最後一個錯誤(我們自己啓動條件錯誤,如果你喜歡),這是在目標計算機上射擊。

未安裝Visual Studio Tools for Office 3.0 Runtime。 請運行Setup.exe

回答