EiEiGuy
EiEiGuy

Reputation: 1547

ClickOnce deployment on Windows 10 is not copying an asset folder to the client computer

I recently started having an issue with an Windows Forms application that uses ClickOnce to deploy, in that, when the install completes, it is missing a data folder that contains a zip file and some *.xlxs files needed for the application to run.

This application has been deployed using ClickOnce over numerous updates for the past few years without any real problems. This issue just started happening around the end of December 2017.

I am using VS2017 for the builds. I am using .Net Framework 4.5.2 and I am developing on Windows 10 Enterprise, v1709, build 16299.192

When I publish the application, whether to a local folder on my Dev computer or to the Web Server we use for customer access to download the application; when I look at the published files an I view the Application Files folder, in the folder for the latest version, I can see the Data folder and it has the files as expected.

However, when we run the installer, it doesn't copy that Data folder to the C:\Users{username}\AppData\Local\Apps\2.0\Data\MXTKKEP7.G7K\8W0HCWQ1.AT0\conf..tion_97fe94acfe5f3262_0002.0001_27630dc69b57826e\Data\ location.

When I then run the application, I get this error;

enter image description here

If I manually copy the Data folder to that location, the program runs as expected, without the error.

I get the same problem, whether I click on the *.application file or right-click on the setup.exe file and select "Run as Administrator".

Is this some kind of new security issue because the Data folder has *.zip and *.xlsx files in it?

Has anyone else ran into this kind of problem?

Upvotes: 4

Views: 2410

Answers (1)

Sergey Vaulin
Sergey Vaulin

Reputation: 732

Check include state for you zip and xls files. Goto Publishing project property > Publish > Application Files > And set for you files in publish status column.

If they are missing please check this article:

[To add files to the Application Files Dialog Box]

https://learn.microsoft.com/en-us/visualstudio/deployment/how-to-specify-which-files-are-published-by-clickonce

Upvotes: 2

Related Questions