正用的好好的,突然vsto不能用了。我是安裝的vs2015 社區版本,本身是不帶vsto的,當初不知道怎嗎安裝上的,昨天突然不能用了。症狀是創建excel workbook 類型的項目是失敗(創建add-in 項目還是可以的)。先是提示:
The project cannot be created because one or more primary interop assemblies required by this project are not installed. To create the project, install the Microsoft Office primary interop assemblies.
安裝了 interop assemblies 后,有提示:
Project cannot be created because the "Excel Visual Studio Design-Time Adaptor Add-in" is not working correctly. Excel might have disabled the add-in or made it inactive, or all add-ins might be disabled in your Trust Center settings. Check the add-in status in Excel Options. If the add-in is active and enabled, reinstall or repair Visual Studio Tools for Office.
看了看是正常的沒什么問題。
那就重新安裝vs2015 吧。安裝完后更完蛋了,因為這個版本是不包含vsto的。
只好找vsto的安裝包,找了好大一氣,也沒找到,ms的 office develop tools下載網站竟然出錯了,不能下載。
同事給了個連接https://www.visualstudio.com/vs/compare/,是比較不同版本vs 不同的,里邊有個連接可以下載vsto安裝包,狂喜,下來后發現是個web安裝包,沒辦法聊勝於無。試試吧。
安裝時,又提示缺少 sql server data tools。在打開 vs 2015 安裝程序,選上安裝之。竟然要 400多M的空間,ms的東西就是豪華啊,占空間一點不客氣。現在還沒安裝完呢。
等着吧,看看安裝完后能否正常。安裝非常慢,估計都是web 安裝,公司網慢啊。
先保存下----------------------------
終於安裝完了!!!
急不可耐打開vs,創建工程,終於.........................
你猜得沒錯,還是不行,濤聲依舊。我那個崩潰啊!不弄了,想靜靜。
很奇怪,明明office 設計師適配器外接程序是正常的,為何vs檢測不到它呢???難道不成是權限的問題?那用管理員權限運行vs看看。右鍵--管理員運行--創建項目--成功!
折騰了這幾天,原來是權限在作怪,坑死我了。
