clickonce problem with COM interop

B

Bob

Hi,
I am trying to publish my application using clickonce. It seems to
build ok but I get the error "Cannot continue. The application is
improperly formatted" with the longer stack trace below when I try to
run the setup file. I think this is because I am using Microsoft
Office via COM interop. I have two questions:

1) Am I likely correct that this is the problem?

2) If I am correct, can I use preprocessor directives to create one
build of my project with reduced functionality that doesn't use
Microsoft Office to get around this problem and have another build of
the same project (maybe deployed via installer) that retains Office or
do I have to split this into separate, parallel projects, one
referencing office and the other not?

Thanks,
Bob


PLATFORM VERSION INFO
Windows : 6.0.6000.0 (Win32NT)
Common Language Runtime : 2.0.50727.312
System.Deployment.dll : 2.0.50727.312 (rtmLHS.050727-3100)
mscorwks.dll : 2.0.50727.312 (rtmLHS.050727-3100)
dfdll.dll : 2.0.50727.312 (rtmLHS.050727-3100)
dfshim.dll : 2.0.50727.312 (rtmLHS.050727-3100)

SOURCES
Deployment url : file:///C:/TestDeploy2/FormsExample1.application

IDENTITIES
Deployment Identity : FormsExample1.application, Version=1.0.0.1,
Culture=neutral, PublicKeyToken=ba6cd432ea79147f,
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 C:\TestDeploy2\FormsExample1.application resulted in
exception. Following failure messages were detected:
+ Exception reading manifest from
file:///C:/TestDeploy2/FormsExample1_1_0_0_1/FormsExample1.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
* [11/9/2007 1:54:03 AM] : Activation of C:
\TestDeploy2\FormsExample1.application has started.
* [11/9/2007 1:54:05 AM] : Processing of deployment manifest has
successfully completed.
* [11/9/2007 1:54:05 AM] : Installation of the application has
started.

ERROR DETAILS
Following errors were detected during this operation.
* [11/9/2007 1:54:05 AM]
System.Deployment.Application.InvalidDeploymentException
(ManifestParse)
- Exception reading manifest from
file:///C:/TestDeploy2/FormsExample1_1_0_0_1/FormsExample1.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)
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top