we encountered following problem with the JustMock profiler.
We have an Outlook VSTO addin. If I start the VSTO addin with debug mode from VS with running JustMock profiler VSTO throws me following error:
************** Exception Text **************
System.MethodAccessException:
UnsafeNativeMethods._AxlGetIssuerPublicKeyHash(IntPtr,
Microsoft.Win32.SafeHandles.SafeAxlBufferHandle ByRef)
bei
System.Security.Cryptography.X509Certificates.X509Native.UnsafeNativeMethods._AxlGetIssuerPublicKeyHash(IntPtr
pCertContext, SafeAxlBufferHandle& ppwszPublicKeyHash)
bei System.Security.Cryptography.Xml.ManifestSignedXml.VerifyAuthenticodePublisher(X509Certificate2 publisherCertificate)
bei
System.Security.Cryptography.Xml.ManifestSignedXml.VerifyAuthenticodeSignature(XmlElement
signatureNode, X509RevocationFlag revocationFlag, X509RevocationMode
revocationMode)
bei
System.Security.Cryptography.Xml.ManifestSignedXml.VerifySignature(X509RevocationFlag
revocationFlag, X509RevocationMode revocationMode)
bei
System.Security.Cryptography.ManifestSignatureInformation.VerifySignature(ActivationContext
application, ManifestKinds manifests, X509RevocationFlag
revocationFlag, X509RevocationMode revocationMode)
bei
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyCertificateSignature(ActivationContext
context, OnlineOfflineState offlineState, String productName,
DeploymentSignatureInformation& signatureInformation)
bei
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext
context, Uri manifest, AddInInstallationStatus installState)
bei Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5472 (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.40305.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
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0
Assembly Version: 10.0.0.0
Win32 Version: 10.0.40305.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
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0
Assembly Version: 10.0.0.0
Win32 Version: 10.0.40305.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.5806
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
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0
Assembly Version: 10.0.0.0
Win32 Version: 10.0.40305.0
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.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
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Deployment
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Security
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5475 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
----------------------------------------
System.Deployment.resources
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase:
file:///C:/Windows/assembly/GAC_MSIL/System.Deployment.resources/2.0.0.0_de_b03f5f7f11d50a3a/System.Deployment.resources.dll
----------------------------------------
mscorlib.resources
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
VSTO Error:
NET Runtime version 2.0.50727.5472 - Failed to CoCreate profiler.
If I deactivate the profiler everything works fine.
Best regards