I have searched the google machine to the ends of they internets and back again and tried everything from clean builds to removing registry entries. This has vexed me for the past week.

It all started out as a simple application project windows form style. New project deserves new visual studio, so I installed VS 2012 and started on my happy little way to writting the epic code that I usually write. The premise is simple: rename a file, open it, read it, insert the date into a database, then archive it. Works fine debugging, works fine installed on windows 7, etc. I initially ran into issues when attempting to publish and install on SBS 2003. I kept getting a sweet error informing me that it was not a valid Win32 application. I wanked around with the application settings, making target cpu x86, changing the framework, etc.. This all occured before reading something that prompted me to realize that I needed to install some updates for VS 2012 to get it to be comptaible with XP and apparently SBS 2003 (NOTE: I developed the app on a Win 7 machine).

Anyways, ran the updates and now the application attempts to install but then hangs up with the excellent error of

Cannot continue. The application is improperly formatted.

Here is the details section from the error.

PLATFORM VERSION INFO
    Windows             : 5.2.3790.131072 (Win32NT)
    Common Language Runtime     : 4.0.30319.296
    System.Deployment.dll       : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll             : 4.0.30319.296 (RTMGDR.030319-2900)
    dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment url          : file://rivendell/installs/Syslog/SyslogTail.application

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of \\rivendell\installs\Syslog\SyslogTail.application resulted in exception. Following failure messages were detected:
        + Exception reading manifest from file://rivendell/installs/Syslog/SyslogTail.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
    * [7/9/2013 9:33:32 AM] : Activation of \\rivendell\installs\Syslog\SyslogTail.application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [7/9/2013 9:33:32 AM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from file://rivendell/installs/Syslog/SyslogTail.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.CheckSignature(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.    

Again, this only occurs on the SBS 2003 server, it still installs and runs fine on the Windows 7 machine. Any help/suggestions are greatly appreciated.

Thanks in advance!

CJ

What version of MS-Windows did you wrikte the program on? Visual Studio 2012 uses .NET Framework 4.0 or newer, so you might have to install .NET 4 on that XP computer.

More info here. It will tell you what version of .NET your IE browser is using. You might visit that link from your XP computer too to find out what version of .NET it has installed.

Edited 3 Years Ago by Ancient Dragon

All that info is in the original post, I wrote it on Windows 7, I modded the framework to use 3.5 for the Small Business Server 2003, and also installed the updates for VS 2012. Before that I was getting not a valid win 32 app, but after installing the updates for VS 2012 it is now attempting to install but hangs and says The application is improperly formatted.

1d3cec58406408772678ca646668906d

I've tried publishing my application with a target framework of 3.5 and with 4 but still no potatoes.

Here is a link to the solution that I found. I created the test certificate as SHA-1. Though now Mysql-connector-net 6.0.4 will not work on Small Business Server 2k3.

Edited 3 Years Ago by Casperjames

This question has already been answered. Start a new discussion instead.