mansellan / clickonce

ClickOnce packager
Other
26 stars 7 forks source link

[Question] How to avoid duplicated .exe.application and .exe.manifest #58

Closed Riebe closed 1 year ago

Riebe commented 1 year ago

Hi, I'm using ClickOnce Packager Task on a CI/CD pipeline. Thing is that after I build on a VM via agent I upload the deployment files to blob storage. This I've been doing for years now but using MSBuild to publish and not just build. Thing is, with ClickOnce Packager I can see two manifest files and two exe. [name].application and [name].application.deploy, [name].manifest.exe and [name].manifiest.exe.deploy In the old way of doing things, the option to add .deploy to files is checked and the only two files after publishing that do not contain such extension are .application and exe.manifest. But using Packager adds the replication as stated above. Any ideas what I'm doing wrong or what could it be? Thanks before hand!

Riebe commented 1 year ago

I believe the Task is flagging the exe.manifest and .application as files and therefore appending .deploy. Then adding them back at a later stage:

Question is... why is this different from the Visual Studio publish?

Adding files... C:\agent\vsts-agent-win-x64-2.165.2\project\bin\Release[projectName].application C:\agent\vsts-agent-win-x64-2.165.2\project\Release[projectName].exe.config C:\agent\vsts-agent-win-x64-2.165.2\project\bin\Release[projectName].exe.manifest

Adding file associations... none found.

Processing application... Warning: MSB3178: Assembly 'C:\agent\vsts-agent-win-x64-2.165.2\project\bin\Release[projectName].application' is incorrectly specified as a file. Warning: MSB3178: Assembly 'C:\agent\vsts-agent-win-x64-2.165.2_work\project\bin\Release[projectName].exe.manifest' is incorrectly specified as a file. Manifest written to 'C:\agent\vsts-agent-win-x64-2.165.2\project\bin\Release\app.publish\Application Files[projectName]_6_1_0_8344[projectName].exe.manifest' Manifest signed.

Processing deployment... Manifest written to 'C:\agent\vsts-agent-win-x64-2.165.2\project\bin\Release\app.publish[projectName].application' Manifest signed.

Riebe commented 1 year ago

To those who might face similar issues.... Go to the cproj file and make sure you set a tag named or simply to false. Hope it helps someone. Took me some pain to figure it out