Office Addin VSTO install error on a specific system - vsto

Our VSTO for installing our Office Word Addin works correctly on all systems tested so far, both in-house and on (almost) all customer systems.
However, on one customer system it is failing.
An attempt to manually install the VSTO results in this error message being displayed: 'Store metadata "ApplicationSourceUri" is not valid'.
We have checked for all the known requirements on the system (Addin certificate, trusted publisher flags in the registry, Office 2010 runtime, etc), but we have yet to find a cause. Online research has so far has not returned an answer.
Any help would be much appreciated!
A VSTO install log generated by Windows gives this error information:
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* An exception occurred while downloading the manifest. Following failure messages were detected:
+ Store metadata "ApplicationSourceUri" is not valid.
ERROR DETAILS
Following errors were detected during this operation.
* [27.04.2018 20:57:19] System.Deployment.Application.DeploymentException (SubscriptionState)
- Store metadata "ApplicationSourceUri" is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ComponentStore.GetPropertyString(DefinitionAppId appId, String propName)
at System.Deployment.Application.ComponentStore.GetPropertyUri(DefinitionAppId appId, String propName)
at System.Deployment.Application.ComponentStore.GetSubscriptionStateInternal(DefinitionIdentity subId)
at System.Deployment.Application.SubscriptionStore.GetSubscriptionStateInternal(SubscriptionState subState)
at System.Deployment.Application.SubscriptionStore.CheckAndReferenceApplication(SubscriptionState subState, DefinitionAppId appId, Int64 transactionId)
at System.Deployment.Application.DeploymentManager.BindCore(Boolean blocking, TempFile& tempDeploy, TempDirectory& tempAppDir, FileStream& refTransaction, String& productName)

Try to remove a corresponding to your application a windows registry key (associated with application):
HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0\PackageMetadata
Then try to re-build and publish it anew.

Related

downloading from a clickonce deployment

I publish my vb.Net windows form app to a location in the server for users to install on their machines. It starts running for about 32% and errors with the following message: Application validation did not succeed. Unable to continue.
Details:
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \MyServer\Dep\Databases\Apps\MyApp.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly TsLibGen.exe.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

Installing Office Customizations System.ArgumentException: Value does not fall within the expected range

I'm trying to deploy my Outlook Add-In to a Windows 10 Machine, but I always get this error after installation:
Name:
From: file:///C:/Users/Public/MycompanyOutlookAddIn.vsto
************** Exception Text **************
System.ArgumentException: Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.VisualStudio.Tools.Office.Runtime.Interop.VSTOEENativeMethods.GetValidCompatibleFramework(String compatibleFrameworkXml)
at Microsoft.VisualStudio.Tools.Office.Runtime.CompatibleFrameworksValidation.ParseFirstValidFramework(String compatibleFrameworksXml)
at Microsoft.VisualStudio.Tools.Office.Runtime.OfficeAddInDeploymentManager.OnAddInManifestsDownloaded(AddInManifestsDownloadedArgs args)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.RaiseOnAddInManifestsDownloadedEvent(IClickOnceAddInInstaller addInInstaller, Uri deploymentManifestUri, AddInInstallationStatus addinSolutionState, String productName, String deploymentManifestXml, String applicationManifestXml, String hostManifestXml, String logFilePath, String version, Uri supportUri)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Some questions from years ago suggested that the path was too long, so I changed mine to the Public directory but I still get this error.
Another thing that I tried was running this:
rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache
but after reinstalling I get the same error.
Weird thing is that When I deploy to Windows 7 machines it works flawlessy. The Add-In was developed without much problems in Windows 8.1. I only get this error on Windows 10. Could somebody please tell me what is going on?
You must install the extension Visual Studio 2010 Tools for Office Runtime
Visual Studio 2010 Tools for Office Runtime

TFS 2010 WorkItem Client - Method not found exception

I have deployed a custom TFS eventpoint to our production webserver. The server does not have the TFS sdk installed so I had to find and bin deploy all dependant dlls. For some reason, when the application tries to contact TFS using the TFS client, it is thrown a missing method exception only on the server. Does anyone know how to get this web service running on a system without installing the full SDK?
The bin deployed TFS dlls
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Common.Library.dll
Microsoft.TeamFoundation.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.Cache.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.dll
Microsoft.TeamFoundation.WorkItemTracking.Proxy.dll
The Exception
System.MissingMethodException: Method not found: 'Boolean Microsoft.TeamFoundation.Client.TfsConnection.HandleUnauthorizedException(Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException)'.
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.HandleComException(Int32 hr)
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreClass.ConnectEx(String connectionString, String defaultCachePath, String instanceId, String userSamName, String userFriendlyName, String userSid, WorkItemServer clientService)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.InitializeInternal()
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Microsoft.TeamFoundation.Client.ITfsTeamProjectCollectionObject.Initialize(TfsTeamProjectCollection teamProjectCollection)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore..ctor(TfsTeamProjectCollection teamProjectCollection)
Looks like partly connected to that problem:
http://blogs.msdn.com/b/bharry/archive/2013/02/13/10392771.aspx
unfortunately I'm still unable to locale where to find proper version of "Microsoft.TeamFoundation.WorkItemTracking.Proxy.dll" library.

Publish ClickOnce installation error "Exception reading from manifest" using VB.NET

I'm using Visual Studio 2010 and VB.NET. My target environment is .NET Framework 4.0.
So I'm facing this problem when I'm publishing my project by using the provided Setup.exe file. After the verifying application requirement popped up, an alert popped up with text:
Cannot Continue. The application is improperly formatted. Contact the application vendor for assistance.
When I clicked on the "Detail" button, it showed me this error:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.239
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.239 (RTMGDR.030319-2300)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment URL : file:///I:/ProjectBMTRelease/ProjectBMT.application
IDENTITIES
Deployment Identity : ProjectBMT.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=7439f62500c0364d, processorArchitecture=x86
APPLICATION SUMMARY
* Installable application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of I:\ProjectBMTRelease\ProjectBMT.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
+ Exception from HRESULT: 0x80070C81
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [6/23/2012 5:21:36 PM] : Activation of I:\ProjectBMTRelease\ProjectBMT.application has started.
* [6/23/2012 5:21:36 PM] : Processing of deployment manifest has successfully completed.
* [6/23/2012 5:21:36 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2012 5:21:36 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c81
Start line: 0
Start column: 0
Host file:
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Runtime.InteropServices.COMException
- Exception from HRESULT: 0x80070C81
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
I checked my project's manifest file, but I am not good enough to find any problem there. For other information, I created simple "Hello World !" application to see if it will get published well, and it did.
What is the solution?
Check the following:
Does the user have .NET 4 installed on their computer?
How are you publishing the application, are you using Visual Studio?
Are you making any changes to the deployment after publishing it?
If you are manually moving the files to the deployment location, is the structure identical to the original structure?
Try enabling detailed logging and see if that provides more information. The
article Enhanced Logging in ClickOnce Deployment shows you how to do that.
I got this very same error. The problem got resolved after I renamed my assembly name found on the first tab under application properties. It seems like having an assembly name with a space creates a manifest filename with a blank space and it seems to create problems. My application assembly name was named "Capital Manager". After I changed it to "Capital_Manager" (I replaced the space with an under score "_") the issue got resolved.
I received an error report and call stack pretty much identical to yours when attempting to run the ClickOnce installer. My findings so far may be helpful to others arriving here, so I'll post the details, but I have a feeling this same error report may be caused by a range of different problems.
The first thing I noticed was that my application manifest (the one that lists all of the files for the application + a signature hash for each) had entries for assemblies that had an invalid publicKeyToken, for example,
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity name="foo.exe" version="1.2.3.4" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
Further down the file instead of seeing dependentAssembly elements for assemblies some of the assemblies were listed as plain content files (file elements).
These problems certainly make the ClickOnce deployment invalid, and the cause was using a version of Mage that was compiled against an older version of .NET than the assemblies it was trying to create manifests for. When creating the application manifest Mage will attempt to read assemblies as follows:
AssemblyIdentity.FromFile(fileName);
And for Mage compiled against .NET 3.5 (CLR 2.0) trying to load a .NET 4.0 assembly results in a BadImageFormatException exception which is handled, and the fall-back behaviour is to treat these files as content files.
Does your application folder have subfolders? I got this same HRESULT just yesterday, and the root cause was that a library (EntityFramework.dll) was in both the top level and in a subfolder. (There was a MAGE warning about this, but it was not handled as an error.) I updated my script to remove EntityFramework.dll from the subfolder, and the ClickOnce is fine now.
Just another possibility - I got a similar error when adding a dpiAware to a newly created app.manifest file. ClickOnce started failing immediately.
I followed the advise here: Installing ClickOnce published DPI-aware application
So if you've been doing dpi things, maybe look there.

ReportBuilder.application fails on my PC - but works on localhost

We're running SQL 2005 on Win2K3 server and are using SSRS. Here's the situation:
I can run Report Builder from localhost
My coworker can run Report Builder on his Vista computer
Another coworker can run Report Builder on his XP SP3 computer (IE7)
I can NOT run Report Builder on my XP SP3 computer (IE7)
I'm told that it could be anything from an errant registry entry to a group policy problem. Here is what I've tried:
Put the site into "Trusted Sites" with "low" security
re-install .NET
create a new local user account and attempt to run it
The results? Every single time, I get a dialog box: "Application cannot be started. Contact the application vendor"
I click the details button and get this:
PLATFORM VERSION INFO
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 2.0.50727.3607
System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000)
mscorwks.dll : 2.0.50727.3607 (GDR.050727-3600)
dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000)
dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000)
SOURCES
Deployment url : http://www.example.com/ReportServer/ReportBuilder/ReportBuilder.application
Server : Microsoft-IIS/6.0
X-Powered-By : ASP.NET
X-AspNet-Version: 2.0.50727
IDENTITIES
Deployment Identity : ReportBuilder.application, Version=9.0.3042.0, Culture=neutral, PublicKeyToken=c3bce3770c238a49, processorArchitecture=msil
APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://www.example.com/ReportServer/ReportBuilder/ReportBuilder.application resulted in exception. Following failure messages were detected:
+ Value does not fall within the expected range.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [4/7/2010 2:53:57 PM] : Activation of http://www.example.com/ReportServer/ReportBuilder/ReportBuilder.application has started.
* [4/7/2010 2:53:58 PM] : Processing of deployment manifest has successfully completed.
ERROR DETAILS
Following errors were detected during this operation.
* [4/7/2010 2:53:58 PM] System.ArgumentException
- Value does not fall within the expected range.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation)
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
* Transaction at [4/7/2010 2:53:58 PM]
+ System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata
- Status: Set
- HRESULT: 0x0
+ System.Deployment.Internal.Isolation.StoreTransactionOperationType (27)
- HRESULT: 0x0
I'm really at a loss. I'm certain there is something on my PC preventing the application from running - but I just don't know what. Google hasn't been much of a help because most problems are related to the server configuration (which I know is correct since it works on other PCs)
Help me, Overflow Kenobi, you're my only hope..
Since you asked so long ago, most probably you don't need this anymore.
Hopefully, since you found the answer and not because you simply quit.
I ran against this problem, also. After some time, found the reason: when a ClickOnce application is executed for the first time on a machine, the URL it was installed from becomes part of this apps' signature.
Unfortunately, this also means when you try to run same application, with exactly same manifest, from another URL you get this or very similar errors.
So if you have a local instance of SQL Server with Reporting Services, and run Report Builder 3.0 for the first time from Report Manager's "Start Report Builder" then next time you try to run it from a real server's Report Manager's link (not from your localhost's) you'll get this error.
The workaround is to manually purge the ClickOnce cache (source):
For Windows Vista:
Find folder <user>\AppData\Local\Apps
Delete the 2.0 folder
Pre-Vista:
Find folder ...\Documents and Settings\<user>\Local Settings\Apps
Delete the 2.0 folder