I've just started to get the following error in my ClickOnce application. When installing and running the same application, after seemingly successful installation I get an error message:
Application Validation did not succeed
The error details I can see the problem to be:
Strong name signature not valid for this assembly stdole.dll.
When i click into details I get
ERROR DETAILS Following errors were detected during this operation.
* [04/13/2016 11:33:22 AM] System.Deployment.Application.InvalidDeploymentException
(SignatureValidation)
- Strong name signature not valid for this assembly stdole.dll.
- Source: System.Deployment
- Stack trace: at System.Deployment.Application.ComponentVerifier.VerifyStrongNameAssembly(String
filePath, AssemblyManifest assemblyManifest) at
System.Deployment.Application.ComponentVerifier.VerifyComponents()
at
System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState
subState, AssemblyManifest deployManifest, AssemblyManifest
appManifest, Uri sourceUriBase, String targetDirectory, String group,
IDownloadNotification notification, DownloadOptions options) 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)
Hey Not sure if you still haven't figured out the problem but please refer to this article: strong-name-signature-not-valid-for-this-assembly-stdole-dll and apply it depending on the version of Visual Studio you are using.
The Problem is that the ClickOnce application is trying to use an unsigned version of the stdole dll but you need to have that signed.
Details from the webpage:
Open path “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11” and “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12”, there is file stdole.dll wich was 16kb large and not signed
Open the path “C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies”, there is file stdole.dll wich was 25kb large and signed
Replaced the unsigned dlls with the signed ones and did another publish
This is a remarkably insidious problem that will sneak up on you again and again (dev boxes, build machines, etc). For whatever reason Microsoft keeps an old unsigned version of the assembly in the Visual Studio assembly search path.
Check out Why is Visual Studio 2015 adding stdole.dll and Microsoft.AnalysisServices.AdomdClient.dll to my project? for some more details and some answers which may help avoid this in the future.
Related
When I try to debug Excel workbook (VSTO) in Visual studio 2015 Enterprice, I get following error,
From: file:///c:/users/sameera.madhusanka/documents/visual studio 2015/Projects/ClassLibrary1/ExcelWorkbook2/bin/Debug/ExcelWorkbook2.vsto
The exception text:
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)
at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
at System.Deployment.Application.SubscriptionStore.get_CurrentUser()
at System.Deployment.Application.DeploymentManager..ctor(Uri deploymentSource, Boolean isUpdate, Boolean isConfirmed, DownloadOptions downloadOptions, AsyncOperation optionalAsyncOp)
at System.Deployment.Application.InPlaceHostingManager..ctor(Uri deploymentManifest, Boolean launchInHostProcess)
at Microsoft.VisualStudio.Tools.Applications.Deployment.IPHMProxy..ctor(Uri uri)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.get_Proxy()
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
You are missing one or more of the files in your deployment. Most probably you have something installed in the GAC on other machines, but the current one doesn't have a component or referenced assembly installed.
You can try turning on the enhanced logging and checking out the results. It might pinpoint exactly what file is missing. You can read more about this in the Enhanced Logging in ClickOnce Deployment article. Also I've found a similar forum thread - GetUserStore throws FileNotFoundException.
I have a machine with a clean install of Windows 7 where I want to install my app.
I've built a WPF App on Windows 10 with prerequisites of .NET 4.5 and Visual C++ Redistributable Packages for Visual Studio 2013
I've included them in my Clickonce installer as Prerequisites:
If I attempt to run the .application file that is generated from Clickonce on the Windows 7 machine, I get the following error:
Cannot Continue. The application is improperly formatted. Contact the
application vendor for assistance.
However, I run the setup.exe on my Windows 7 machine it correctly prompts that it needs to install .NET 4.5 and Visual C++ Redistributable Packages for Visual Studio 2013. It then successfully goes through the install process for each Prerequisite.
Except, after the Prerequisites are installed, I receive the same The application is improperly formatted. error from above.
If I then re-run the .application file it will finally install.
Either way, this is definitely not a good user experience. Is this something to do with building the App on Windows 10 and attempting to install on Windows 7?
I've seen this question which seems similar, however I am installing .NET 4.5 as a prerequisite:
Manifest may not be valid or the file could not be opened.
Below are the error details:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 2.0.50727.5420
System.Deployment.dll : 2.0.50727.5420 (Win7SP1.050727-5400)
mscorwks.dll : 2.0.50727.5420 (Win7SP1.050727-5400)
dfdll.dll : 2.0.50727.4927 (NetFXspW7.050727-4900)
dfshim.dll : 4.0.40305.0 (Main.040305-0000)
SOURCES
Deployment url : file:///C:/Users/BHS/Desktop/New%20folder/BHSScaleOps.application
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\BHS\Desktop\New folder\BHSScaleOps.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/Users/BHS/Desktop/New%20folder/BHSScaleOps.application: the manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ SignatureDescription could not be created for the signature algorithm supplied.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [3/21/2017 4:20:01 PM] : Activation of C:\Users\BHS\Desktop\New folder\BHSScaleOps.application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [3/21/2017 4:20:01 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/Users/BHS/Desktop/New%20folder/BHSScaleOps.application: 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.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
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 (SignatureValidation)
- Manifest XML signature is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
- SignatureDescription could not be created for the signature algorithm supplied.
- Source: System.Security
- Stack trace:
at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key)
at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey)
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Your manifest is signed using SHA-256. When you try to install the ClickOnce application on a machine which has only .NET 4.0 installed you receive the Manifest XML signature is not valid error you mentioned because up to .NET 4.0 SHA-1 is expected.
This is why after you successfully installed .NET 4.5 as prerequisite everything works fine. I have no idea why this isn't working in a single step but requires two steps instead. Perhaps this relates to a restart required after installing the new framework version?
The solution is to use SHA-1 when signing your manifest. You can find information on how to achieve this in this answer from Miroslav Nedyalkov.
I'm having a problem using ClickOnce,
It is an online Clickonce.
My project is C# project built in Visual Studio 2013.
The application works on 99% of the machines , but there are few computers which it doesnt deploy containing the error:
Following errors were detected during this operation. * [16/08/2015
14:19:05] System.IO.FileNotFoundException
- The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
- Source: mscorlib
- Stack trace: at System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(CreateActContextParameters&
Params) at
System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(IDefinitionAppId
AppId) at
System.ActivationContext.CreateFromName(ApplicationIdentity
applicationIdentity) at
System.ActivationContext.CreatePartialActivationContext(ApplicationIdentity
identity) 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)
The error occur in the end of the installion, but I suppose it doesnt really install (there are some files in the appdata folder, but when I click the ClickOnce installer again, it reinstall it from 0)
I've done some research, and I got to the registry key :
HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\OnlineAppQuotaUsageEstimate
Which is the cache location for online Clickonce applications.
On the computers which works, after the installer the value change to 837207846
On the computers which the ClickOnce doesnt work, it changes to 0.
any suggestions how to fix that problem?
i have made a project in Net 4.0,c# win application; using MageUI.exe i have created and application and deployment manifest in this way:
i have saved my output release project in a local dir (C:\Users\Gio\Desktop\ClickOnceDeploy\Application Files\Evolution_1_0_0_0), then with MageUI.exe i have created new application manifest ,setting Name and description value, x86 processor; in tab files i have set my local dir path, then i have populated grid Application(through button populate) and i have saved application manifest(Evolution.exe.manifest) in my local dir with my output release files.
after i have created new deployment manifest setting the same application manifest Name and description,x86 processor and in tab deployment options in start location i have set my share dir :
"\srvnas2\gio\testDeploy\Application Files\Evolution.application".
Then in Apllication reference tab, i have selected application manifest in my local dir.
I have saved my deployment manifest, moving up one directory to the root of my local dir (in C:\Users\Gio\Desktop\ClickOnceDeploy\Application Files).
after this, i have copied all my local dir contents in share dir
(\srvnas2\gio\testDeploy\Application Files) and then i have clicked Evolution.application as setup.
a popup told me to install my application and after clicking install button, i have got InvalidDeploymentException error:
Errors detail:
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.18444
System.Deployment.dll : 4.0.30319.34244 built by: FX452RTMGDR
clr.dll : 4.0.30319.18444 built by: FX451RTMGDR
dfdll.dll : 4.0.30319.34244 built by: FX452RTMGDR
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file://srvnas2/gio/testDeploy/Application%20Files/Evolution.application
Deployment Provider url : file://srvnas2/gio/testDeploy/Application%20Files/Evolution.application
Application url : file://srvnas2/gio/testDeploy/Application%20Files/Evolution_1_0_0_0/Evolution.exe.manifest
IDENTITIES
Deployment Identity : Evolution.app, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fe14ca94139b6fbf, processorArchitecture=x86
Application Identity : Evolution.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fe14ca94139b6fbf, processorArchitecture=x86, type=win32
APPLICATION SUMMARY
* Installable application.
RIEPILOGO ERRORI
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\srvnas2\gio\testDeploy\Application Files\Evolution.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly Evolution.exe.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
STATO OPERAZIONE
* [03/02/2015 14:49:59] : Activation of \\srvnas2\gio\testDeploy\Application Files\Evolution.application avviata.
* [03/02/2015 14:49:59] : Processing of deployment manifest has successfully completed
* [03/02/2015 14:49:59] : Installation of the application has started.
* [03/02/2015 14:49:59] : Processing of application manifest has successfully completed.
* [03/02/2015 14:50:02] : Found compatible runtime version 4.0.30319.
* [03/02/2015 14:50:02] : Request of trust and detection of platform is complete.
ERROR DETAILS
Following errors were detected during this operation.
* [03/02/2015 14:50:05] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
- Reference in the manifest does not match the identity of the downloaded assembly Evolution.exe.
- Source: System.Deployment
- stack:
in System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
in System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
in System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
in System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
in System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
in System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
in System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
in System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
in System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
in System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
i have seen in web to found a solution but i haven't found it, have you any suggest?
After investigating this issue, I found that this issue occurs due to a manifest being embedded into the executable while building the application.
So i created an application without manifest and worked perfectly.
after some research I made publish my files on ftp.
But when I download "setup.exe" file from web and trying run it, I getting error "Cannot Start Application"
I looked for same error but all answers was for others errors
Error summary was saying that my manifest may be not valid or file could not be opened, but then why other people can use ftp, create guides that its working.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://www.marzuk.site11.com/webtest/ClickOnceWebTest.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from http://www.marzuk.site11.com/webtest/Application%20Files/ClickOnceWebTest_1_0_0_0/ClickOnceWebTest.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Unexpected end of file has occurred. The following elements are not closed: br, br. Line 3, position 254.
Some properties of publishing:
Used software Visual studio 2013
Web hosting http://www.000webhost.com/
publishing folder location ftp://web.site11.com/public_html/webtest/
installation folder URL http://www.web.site11.com/webtest/
deployment web page default.htm
So the main question is: What stopping setup from installation and what im doing wrong?
There is the full log of error:
PLATFORM VERSION INFO Windows : 6.2.9200.0 (Win32NT) Common Language Runtime : 4.0.30319.34014 System.Deployment.dll :
4.0.30319.33440 built by: FX45W81RTMREL clr.dll : 4.0.30319.34014 built by: FX45W81RTMGDR dfdll.dll : 4.0.30319.33440 built by: FX45W81RTMREL dfshim.dll : 6.3.9600.16384 (winblue_rtm.130821-1623)
SOURCES Deployment url : http://www.web.site11.com/webtest/ClickOnceWebTest.application
Server : Apache Deployment Provider url : http://www.web.site11.com/webtest/ClickOnceWebTest.application
IDENTITIES Deployment Identity : ClickOnceWebTest.application, Version=1.0.0.0, Culture=en-US, PublicKeyToken=b3b9502bd69c8e4f, processorArchitecture=msil
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 http://www.web.site11.com/webtest/ClickOnceWebTest.application resulted in exception. Following failure messages were detected: + Exception reading manifest from http://www.web.site11.com/webtest/Application%20Files/ClickOnceWebTest_1_0_0_0/ClickOnceWebTest.exe.manifest: the manifest may not be valid or the file could not be opened. + Unexpected end of file has occurred. The following elements are not closed: br, br. Line 3, position 254.
COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.
WARNINGS There were no warnings during this operation.
OPERATION PROGRESS STATUS * [2014-06-27 16:09:22] : Activation of http://www.web.site11.com/webtest/ClickOnceWebTest.application has started. * [2014-06-27 16:09:23] : Processing of deployment manifest has successfully completed. * [2014-06-27 16:09:23] : Installation of the application has started.
ERROR DETAILS Following errors were detected during this operation. * [2014-06-27 16:09:23] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from http://www.web.site11.com/webtest/Application%20Files/ClickOnceWebTest_1_0_0_0/ClickOnceWebTest.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.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, 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.Xml.XmlException
- Unexpected end of file has occurred. The following elements are not closed: br, br. Line 3, position 254.
- Source: System.Xml
- Stack trace: at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read() at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read() at System.Xml.XmlTextReaderImpl.Skip() at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read() at System.Xml.XmlTextReaderImpl.Skip() at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read() at System.Xml.XmlCharCheckingReader.Read() at System.Xml.XsdValidatingReader.Read() at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
COMPONENT STORE TRANSACTION DETAILS No transaction information is available.
Have you checked the manifest file is valid? Is the webserver configured to serve up .manifest files? Some configuration is required on the server to deploy clickonce applications. Try deploying it to a local web server first.