2

ユーザーのマシンの1つにインストールされていないExcelVSTOアドインがあります。これまでのところ、他のすべてのマシン(8台のマシン)には正常にインストールされますが、この1台の特定のマシンでは、次のエラーメッセージが表示されます。

Customization could not be loaded because the application domain could not be created.


************** Exception Text **************
Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> System.TypeLoadException: Could not load type 'System.AddIn.Pipeline.QualificationDataAttribute' from assembly 'System.AddIn.Contract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at System.Runtime.Remoting.Metadata.RemotingCachedData.GetSoapAttribute()
   at System.Runtime.Remoting.InternalRemotingServices.GetCachedSoapAttribute(Object reflectionObject)
   at System.Runtime.Remoting.SoapServices.GetXmlTypeForInteropType(Type type, String& xmlType, String& xmlTypeNamespace)
   at System.Runtime.Remoting.RemotingServices.DetermineDefaultQualifiedTypeName(Type type)
   at System.Runtime.Remoting.Metadata.RemotingTypeCachedData.get_QualifiedTypeName()
   at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, ConstructorCallMessage& ctorCallMsg)
   at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(Type serverType)
   at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
   at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
   at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.DomainInitializer.ActivatePipeline(String addInAssembly, String addInClass, String[] pipelineInfo)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.DomainInitializer.StartAddIn(IntPtr hostServiceProvider, String[] pipeline, String assemblyName, String[] entryPoints)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.DomainInitializer.StartAddIn(IntPtr hostServiceProvider, String[] pipeline, String assemblyName, String[] entryPoints)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.LoadMafPipeline(AppDomain newDomain, IntPtr hostServiceProvider, String fullAssemblyName, String[] entryPoints, OfficeApp officeApplication, OfficeVersion officeVersion, IntPtr& executor)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor)
   --- End of inner exception stack trace ---


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31007.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31007.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0.dll
----------------------------------------
System.AddIn
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.5446 built by: Win7SP1GDR
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.31007.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.4130
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
----------------------------------------

なぜこのエラーが発生するのかわかりません。グーグルの周りから、立派な情報源から何も返されませんでした。.NET 3.5がインストールされていることをユーザーに確認してもらい、管理者として実行しましたが、何も役に立たないようです。

アドインを自動的にフックしてレジストリからExcelを取得するインストーラーがありますが、VSTOがインストールされている場合、同じエラーメッセージが表示されます。

このエラーメッセージが何を示しているのか理解できません。誰かが私を助けることができますか?

4

3 に答える 3

1

Windows 7 64 ビットでも同様の問題が発生しました。参照エラーの一部は次のとおりです。

Not loaded. A runtime error occurred during the loading of the COM Add-in.

Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created.

System.TypeLoadException: Could not load type 'System.AddIn.Pipeline.QualificationDataAttribute' from assembly 'System.AddIn.Contract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

この問題は、オペレーティング システムの機能である Microsoft .NET Framework 3.5.1 の破損が原因で発生しました。

.NET Framework 3.5 を修復または再インストールする方法 http://www.adminarsenal.com/admin-arsenal-blog/how-to-repair-or-reinstall-net-framework-3-5/

于 2016-01-14T19:30:21.813 に答える
0

わかりました-ユーザーのマシンに何か問題があったことがわかりました。ユーザーが自分のアドインをアンインストールし、自分のマシンで他のアドインを有効にすると、エラー メッセージが引き続き表示されました。私のアドインではなく、彼のマシンをトラブルシューティングする時間です!

他の人へのメモとして、環境変数に変数を追加することによるエラーメッセージの抑制を解除することにより、エラーメッセージを表示できます->システム変数

変数名: VSTO_SUPPRESSDISPLAYALERTS

変数値: 0

最終更新:

ユーザーは Microsoft Office Professional Plus 2010 を使用しており、Visual Studio はこのバージョンの Microsoft Office 用のアドインを作成できないことが判明しました。

https://connect.microsoft.com/VisualStudio/feedback/details/687449/vsto-not-compatible-with-office-professional-plus-2010

于 2012-09-14T15:38:11.123 に答える
0

この投稿では、この例外が発生した場合、完全な.NET フレームワーク (クライアント プロファイルではなく) をインストールする必要があると主張しています。何人かの人々は、これで問題が解決したと述べています。

(理想的には、VSTO はクライアント プロファイル フレームワークのみを必要とする必要があります。完全なフレームワークを必要とする VSTO で何かを行っていますか、それとも前提条件の 1 つですか?)

于 2012-09-13T13:56:16.360 に答える