This is a migrated thread and some comments may be shown as answers.

Winforms deployment via ClickOnce

2 Answers 1402 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
Iron
Veteran
Iron
David asked on 23 Aug 2020, 07:37 PM

While I have been a heavy user of the Asp.net/Ajax suite of Telerik controls, I have never actually deployed any winforms based apps before.  I took an existing legacy production application, stripped it of Crystal Reports, added a RadGridView control along with a couple of RadButtons.  Everything works marvelously in a development mode. When it comes time to publish the application it appears to be impossible to publish it and install the resulting installation.

I have used all the suggestions I have found, such as resetting the "Application Files" on the publish page.  Everything seems to be properly configured yet the application remains un-installable once published.  I get "the manifest may not be valid or the file could not be opened errors".  The "invalid child element 'SignedInfo' is found.  I have dug into the installation folder and see the relevant files are in place.

Now I hesitate to point fingers to Telerik however the second I rollback to my pre-Telerik state I can publish the same app, using the identical settings, and properly install the application.  This suggests, to me, that I am somehow failing to include something.  Can anyone please assist or point me to help?

Am I missing some magic?

The error log generated is along the following:

 

 

PLATFORM VERSION INFO
Windows : 10.0.19041.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.8.4200.0 built by: NET48REL1LAST_C
clr.dll : 4.8.4200.0 built by: NET48REL1LAST_C
dfdll.dll : 4.8.4200.0 built by: NET48REL1LAST_C
dfshim.dll : 10.0.19041.1 (WinBuild.160101.0800)

SOURCES
Deployment url : file://ipc-8930d/InstallSite/Internment/Interment.application
Deployment Provider url : file://ipc-8930d/InstallSite/Internment/Interment.application

IDENTITIES
Deployment Identity : Interment.application, Version=2.0.0.0, Culture=en-US, PublicKeyToken=e691ae88eb0bb1c9, 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 \\ipc-8930d\InstallSite\Internment\Interment.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file://ipc-8930d/InstallSite/Internment/Application%20Files/Interment_2_0_0_0/Interment.exe.manifest: the manifest may not be valid or the file could not be opened.
+ The element 'assembly' in namespace 'urn:schemas-microsoft-com:asm.v1' has invalid child element 'SignedInfo' in namespace 'http://www.w3.org/2000/09/xmldsig#'. List of possible elements expected: 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'file' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'file, configuration, deployment, entryPoint, trustInfo, licensing, migration' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'clrClass' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'clrClass' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'clrSurrogate' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'clrSurrogate' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'comInterfaceExternalProxyStub' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'comInterfaceExternalProxyStub, KeyInfo' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'Signature' in namespace 'http://www.w3.org/2000/09/xmldsig#' as well as any element in namespace 'urn:schemas-microsoft-com:asm.v3' as well as 'publisherIdentity' in namespace 'urn:schemas-micr....

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [8/22/2020 7:47:24 PM] : Activation of \\ipc-8930d\InstallSite\Internment\Interment.application has started.
* [8/22/2020 7:47:24 PM] : Processing of deployment manifest has successfully completed.
* [8/22/2020 7:47:24 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [8/22/2020 7:47:24 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file://ipc-8930d/InstallSite/Internment/Application%20Files/Interment_2_0_0_0/Interment.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, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Xml.Schema.XmlSchemaValidationException
- The element 'assembly' in namespace 'urn:schemas-microsoft-com:asm.v1' has invalid child element 'SignedInfo' in namespace 'http://www.w3.org/2000/09/xmldsig#'. List of possible elements expected: 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'dependency' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'file' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'file, configuration, deployment, entryPoint, trustInfo, licensing, migration' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'clrClass' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'clrClass' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'clrSurrogate' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'clrSurrogate' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'comInterfaceExternalProxyStub' in namespace 'urn:schemas-microsoft-com:asm.v1' as well as 'comInterfaceExternalProxyStub, KeyInfo' in namespace 'urn:schemas-microsoft-com:asm.v2' as well as 'Signature' in namespace 'http://www.w3.org/2000/09/xmldsig#' as well as any element in namespace 'urn:schemas-microsoft-com:asm.v3' as well as 'publisherIdentity' in namespace 'urn:schemas-micr....
- Source: System.Xml
- Stack trace:
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(ValidationEventHandler eventHandler, Object sender, XmlSchemaValidationException e, XmlSeverityType severity)
at System.Xml.Schema.XmlSchemaValidator.ValidateElementContext(XmlQualifiedName elementName, Boolean& invalidElementInContext)
at System.Xml.Schema.XmlSchemaValidator.ValidateElement(String localName, String namespaceUri, XmlSchemaInfo schemaInfo, String xsiType, String xsiNil, String xsiSchemaLocation, String xsiNoNamespaceSchemaLocation)
at System.Xml.XsdValidatingReader.ProcessElementEvent()
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.

 

 

2 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 24 Aug 2020, 01:21 AM

Well, I found an answer.  It seems when I used the "add refs" option converting my non-Telerik app to a Telerik app, I answered a question wrong.  During that wizard its last question was to enable high density pixel support.  Answering YES was where my problems started.  

It seems that answer requires the project to be .NET 4.7 or later.  My project was .NET 4.61.  After much comparisons between working and non-working sample projects the differences boiled down to the existence of the "app.manifest" file or its presence.  My working Telerik samples all did not have a app.manifest file (and I answer No to that question).  Upon removal of the "app.manifest" file, my modified legacy project now compiles, runs, deploys and it even installs now.  

If I might humbly suggest the Telerik folks need better documentation on the ramifications of those pesky little questions.  It would be better if the wizard did not ask that question if your project is not high enough to support that option. (my humble opinion)

I am impressed how simple inclusion of the Telerik controls was in the resulting deployment.   Kudos to the team.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Aug 2020, 08:56 AM
Hello, David,

I am glad that you have found the answer for your scenario.

Indeed, declaring DPI awareness in the app.manifest file breaks ClickOnce applications. There is a know issue regarding the ClickOnce installer when reading the manifest.Please have a look at the following KB article which is quite useful on this topic: https://docs.telerik.com/devtools/winforms/knowledge-base/clickonce-application-is-broken   
 
I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
David
Top achievements
Rank 1
Iron
Veteran
Iron
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or