ClickOnce ... endless frustrations

Hi,
if ClickOnce was a person i'd certainly give it a knock out right now ... I'm so frustrated with that thing, using it since the early alpha bits and always having problems with it ... now in beta 2 it doesn't work again the way it's supposed to.
The specific problems I have right now are:
As soon as I activate ClickOnce security settings, setting them to full trust and debugging the applicatin with this permission set, as soon I try to launch my application I get:
"This application has failed to start because the application configuration is incorrect. Review the manifest for possible errors."
In the EventViewer i get 4 SidebySide errors:
"Generate Activation Context failed for C:\Documents and Settings\Administrator\Desktop\Work\SamClientSolution\Client\bin\Debug\Sam.exe.Manifest. Reference error message: The manifest file does not begin with the required tag and format information."
"The application failed to launch because of an invalid manifest."
"Syntax error in manifest or policy file "C:\Documents and Settings\Administrator\Desktop\Work\SamClientSolution\Client\bin\Debug\Sam.exe.Config" on line 2."
"Syntax error in manifest or policy file "C:\Documents and Settings\Administrator\Desktop\Work\SamClientSolution\Client\bin\Debug\Sam.exe.Config" on line 2. The manifest file root element must be assembly."
Ok... so I'm checking the config file which I wouldn't see what should be wrong with it and I'm checking the manifest file, not knowing what's wrong with it either.
The weird thing is, publishing works when I go to Build -> Publish Client, however I get errors when using Publish Now or Publish Wizard:
Error 1 Publish failed with the following error: Could not find a part of the path 'C:\Documents and Settings\Administrator\Desktop\Work\SamClientSolution\Client\publish\Sam_1_2_0_5'. 1 1 Client
?
Error 4 Cannot publish because a project failed to build. 1 1 MshtmlInstaller
? so why can I build it manually?
Error 5 A signing key is required in order to publish this project. Publishing from Visual Studio 2005 will automatically configure a signing key for this project. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Microsoft.Common.targets 3132 9
? Well, I checked Sign the clickonce manifests and Sign the assembly using a generated key.
So, what the heck am I doing wrong? ..
Thanks,
Tom
P.S.: Here's the manifest:

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" 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">
<asmv1:assemblyIdentity name="Sam.exe" version="1.2.0.4" publicKeyToken="2ee90839164f410a" language="neutral" processorArchitecture="msil" type="win32" />
<description asmv2:iconFile="houses.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
<application />
<entryPoint>
<assemblyIdentity name="Sam" version="1.2.1983.17596" publicKeyToken="43165F996C8D53FA" language="neutral" processorArchitecture="msil" />
<commandLine file="Sam.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site">
<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="USERNAME" />
<IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Allowed="AssemblyIsolationByUser" UserQuota="9223372036854775807" Expiry="9223372036854775807" Permanent="True" />
<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ReflectionEmit" />
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Assertion, Execution, BindingRedirects" />
<IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
<IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
<IPermission class="System.Windows.Forms.WebBrowserPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="True" />
<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Level="DefaultPrinting" />
</PermissionSet>
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<dependency>
<dependentOS>
<osVersionInfo>
<os majorVersion="4" minorVersion="10" buildNumber="0" servicePackMajor="0" />
</osVersionInfo>
</dependentOS>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50215.44" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="Microsoft.mshtml" version="7.0.3300.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="HtmlEditor.dll" size="102400">
<assemblyIdentity name="HtmlEditor" version="1.0.1983.16746" publicKeyToken="43165F996C8D53FA" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>AyHcswUoOPXLP8mrNFJyLO5fFQU=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Sam.exe" size="1269760">
<assemblyIdentity name="Sam" version="1.2.1983.17596" publicKeyToken="43165F996C8D53FA" language="neutral" processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>wIgKc+XgnJiTzQYsfWhDHOVPDjw=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<file name="houses.ico" size="26694">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>Qgxgo5uOATpHx9UvuEngXNemaAo=</dsig:DigestValue>
</hash>
</file>
<file name="Sam.exe.config" size="1787">
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>GskFP3n1BQKl9lx7OMWpmbuDXdw=</dsig:DigestValue>
</hash>
</file>
<Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>fEZLqrVK6zXVx0sq1rpa0zVP77c=</DigestValue></Reference><Reference URI="#StrongNameKeyInfo"><Transforms><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>o4JjE0Mh/BTqt8PcRzViVNES3nY=</DigestValue></Reference></SignedInfo><SignatureValue>RRaS6QAS++n01qUfSZ3vR468pn/ZYLUKafUNRYRQVFLBq3kwg6fmyV+3VX63RfWiOQjQGHNTJUY7j9xCJTPj76uTKLQwyxDuFZLFOwK0wYqTImKnKVBMNh6CHEdd+XRcP1/aQCZQDnJj5yZaz5cCj/TeA+NMjWYNgGIHYRsf8QA=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>rZ5ezUe3iVMJe+g9gpGgA5T/+YOrNv+mC/pRl3mBijalNBtAwB27uMR6V3Yyqw19HeOTDNttQOd4kzRHRgqrnO4pSHX8gbgnXspIL3UV+OpJIEvLEf2qeOuGUx004EwGf786852sNYRnMNh9T9wJh1Y2cmcqevauUFA/shRyfAk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="8763fc7eb1e62acb5ba38b1ede6b002a91e0be92" Description="" Url=""><as:assemblyIdentity name="Sam.exe" version="1.2.0.4" publicKeyToken="2ee90839164f410a" language="neutral" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=OTHERLAND\Administrator</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>dG3FINL9PJewHxI/et8xOZbb/DA=</DigestValue></Reference></SignedInfo><SignatureValue>MXlInUC4YgnWD4c6f4kwuewJ2SzIXtu6PgQgyEDsl9aygILf60IO0pHmcov4fyzoyuazQAjtz7bqP/zd8YEGWDSncE35tWCr7+z5SKPdHxkHB6w4nLrYboPMgpzK7smKAgXyglKBkDvXt1pDiqsJzjEoGnsPFGSoXRygkdPrvrg=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>rZ5ezUe3iVMJe+g9gpGgA5T/+YOrNv+mC/pRl3mBijalNBtAwB27uMR6V3Yyqw19HeOTDNttQOd4kzRHRgqrnO4pSHX8gbgnXspIL3UV+OpJIEvLEf2qeOuGUx004EwGf786852sNYRnMNh9T9wJh1Y2cmcqevauUFA/shRyfAk=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB7TCCAVqgAwIBAgIQWp3fBGDNp6JKXuPlohN7VTAJBgUrDgMCHQUAMDkxNzA1BgNVBAMeLgBPAFQASABFAFIATABBAE4ARABcAEEAZABtAGkAbgBpAHMAdAByAGEAdABvAHIwHhcNMDUwNjA2MDczNDE0WhcNMDYwNjA2MTMzNDE0WjA5MTcwNQYDVQQDHi4ATwBUAEgARQBSAEwAQQBOAEQAXABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCtnl7NR7eJUwl76D2CkaADlP/5g6s2/6YL+lGXeYGKNqU0G0DAHbu4xHpXdjKrDX0d45MM221A53iTNEdGCquc7ilIdfyBuCdeykgvdRX46kkgS8sR/ap464ZTHTTgTAZ/vzrznaw1hGcw2H1P3AmHVjZyZyp69q5QUD+yFHJ8CQIDAQABMAkGBSsOAwIdBQADgYEAnlfjd1y0qp8Uq/F2/z9SRzY24y3+JuUkaOApQbuBbrtVTte7KiOPmyAglDshYRGDwODRSs2cyG0f+RTGl4wrgupJ5UbhevQDdXuBolyPjywhrOKL49KZL8M04Dze92dmicIOu59dcqeCZPFsPIjTcVWJz9BVVscQh29x/EJo2M8=</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>


[13318 byte] By [TomFrey] at [2008-1-28]
# 1
One thing that caught me was if you're publishing to Windows Server 2003 you need to add the mime types for .deploy and .manifest.

I had errors like that, which went away once I did another build of the solution. Almost like I had to click Publish, wait for it to fail, click Build, wait for it to finish, and click Publish again.

Good luck
dave

DavidA.Coursey at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 2
The problem is not really the publish, since I can get that one to work. However, the software won't start in debugger or normaly unless I delete the manifest... which in turn is needed for ClickOnce to work
TomFrey at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 3
what I forgot to mention:
As soon as I enable the ClickOnce security settings, setting them to full trust, I get "Unspecified error. The operation could not be completed" whenever I try to run the application
TomFrey at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 4
wheeeew I fixed it. This blogpost brought me in the direction though it was geared towards Beta1: http://tonesnotes.org/2004/09/17/windows-forms-user-settings-save
Looks that there is a similar problem still in Beta 2. After I have removed all the user settings the application now runs under full trust and can be "ClickOnced"...
TomFrey at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 5
how did you generate this this .exe.config file ? The VS IDE editor does not write the encoding attribute
SreekanthBharatham at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 6
VS wrote it. I'm not exactly sure where the problem was. It worked however, once I redid my user settings
TomFrey at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 7

I'm having this issue as well. What were the exact steps you used to resolve the problem?

Thanks
CT

ctadlock at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...
# 8
This is a totally retarded problem and it's frustrating the hell out of me too. I've got a deadline and I can't run my code from VS at all.
After as many auto-updaters as Microsoft has put out...
Jamie Cool wrote app-updater
I wrote V1 of Updater application block
V2 shipped quite a while ago
now whidbey's clickOnce...
and it's STILL hit-or-miss. It's not that hard a problem!
But putting the code in an unusable state in the editor...now that's new.
methylamine at 2007-9-8 > top of Msdn Tech,Windows Forms,ClickOnce and Setup & Deployment Projects...