0
我有一個適用於Office 2003的VSTO 2005 Office外接程序,它基於.NET 2構建,運行得很好,但它只能在.NET Framework 4安裝的是而不是。如果安裝了.NET Framework 4,VSTO 2005外接程序無法啓動
如果我安裝了.NET Framework 4,那麼它將不會啓動。我已經通過了環境變量VSTO_SUPPRESSDISPLAYALERTS
設置爲0
啓用調試,所以Office應用程序的啓動過程中,我可以看到錯誤:
爲「Microsoft.VisualStudio.Tools.Applications.Runtime.DomainFactory」的類型初始值引發了異常。
************** Exception Text **************
System.TypeInitializationException: The type initializer for 'Microsoft.VisualStudio.Tools.Applications.Runtime.DomainFactory' threw an exception. ---> System.NotSupportedException: The Microsoft .NET Framework 2.0 or later is not correctly installed. Microsoft Visual Studio 2005 Tools for the Microsoft Office System requires the Microsoft .NET Framework 2.0 or later."
at Microsoft.VisualStudio.Tools.Applications.Runtime.PolicyInfo.InitializeFromConfigurationFiles(PolicyLevel& enterprisePolicy, PolicyLevel& machinePolicy, PolicyLevel& userPolicy)
at Microsoft.VisualStudio.Tools.Applications.Runtime.PolicyInfo..ctor()
at Microsoft.VisualStudio.Tools.Applications.Runtime.DomainFactory..cctor()
--- End of inner exception stack trace ---
任何幫助或想法將不勝感激,因爲我不知道該怎麼去與此。
你需要收集一些更多的信息。查看這裏的疑難解答提示:http://blogs.msdn.com/b/brijs/archive/2008/10/10/tips-tricks-for-troubleshooting-for-office-add-ins-part-1 .aspx – Eddy 2012-01-11 14:53:33
我剛剛嘗試過AddInSpy,它只告訴我外接程序安裝OK – Cocowalla 2012-01-11 15:09:35