robertb_NZ
Well-known member
Summary: I am trying to use ClickOnce, but when I run my application a file seems to be missing. I can't see any difference from other files that are successfully deployed.
Detail: My application requires a number of application files that must be deployed with the compiled software. For example, ErrorHelp.txt, COBOL.jzc, Templates.xml, to pick out just three. There are about a dozen such non-compiled objects. They all have properties Build Action = Content, and Copy To Output Directory = Do Not Copy.
When I publish the application all these files are correctly put into the build as ErrorHelp.txt.deploy, COBOL.jzc.deploy, and Templates.xml.deploy, etc, and when I run the deployed application it runs in a way that would be impossible unless most of the files were available. However templates.xml appears to be missing. Everything was working perfectly using Visual Studio's debugger, but I needed to debug the application when it was run as a clickonce, so I added a Msgbox statement just before the program attempted to load templates.xml: -
The MsgBox displayed
Using Windows Explorer I followed down this path and I found that the folder contained 17 objects, including ErrorHelp.txt and COBOL.jzc, but not \Templates.xml. I examined the corresponding file that had been created when the application was published and found 15 objects, including COBOL.jzc.deploy, ErrorHelp.txt.deploy, and Templates.xml.deploy. Objects without a corresponding .deploy object were Ftp.cdf-ms, Ftp.manifest, Jazz.cdf-ms, Jazz.exe.cdf-ms and missing objects were Templates.xml and FtpLicense.xml. (FTP is a third-party library that I have licensed for this application).
The two functions which depend on these xml objects don't work. Everything else seems to be OK. Everything (including these two functions) work OK with the debugger.
I'm also puzzled by the fact that if I publish the application with option "The application is available online only" it doesn't work at all, throwing message "Application cannot be started. Contact the application vendor". However if I use the option "The application is available offline as well" it works, albeit with the problems above. I don't know if this is a separate problem or part of this one.
I hope somebody can help me, because I've run out of ideas. I've tried to find the answer through MSDN and Google, but nothing leaps out at me.
Regards, Robert.
Detail: My application requires a number of application files that must be deployed with the compiled software. For example, ErrorHelp.txt, COBOL.jzc, Templates.xml, to pick out just three. There are about a dozen such non-compiled objects. They all have properties Build Action = Content, and Copy To Output Directory = Do Not Copy.
When I publish the application all these files are correctly put into the build as ErrorHelp.txt.deploy, COBOL.jzc.deploy, and Templates.xml.deploy, etc, and when I run the deployed application it runs in a way that would be impossible unless most of the files were available. However templates.xml appears to be missing. Everything was working perfectly using Visual Studio's debugger, but I needed to debug the application when it was run as a clickonce, so I added a Msgbox statement just before the program attempted to load templates.xml: -
MsgBox("Attempting to load templates from " & Source)
xmlTemplates.Load(Source)
xmlTemplates.Load(Source)
The MsgBox displayed
"Attempting to load templates from <path>\templates.xml"
("<path>" was the actual path to the application - long and involved and including something that looked like a GUID)Using Windows Explorer I followed down this path and I found that the folder contained 17 objects, including ErrorHelp.txt and COBOL.jzc, but not \Templates.xml. I examined the corresponding file that had been created when the application was published and found 15 objects, including COBOL.jzc.deploy, ErrorHelp.txt.deploy, and Templates.xml.deploy. Objects without a corresponding .deploy object were Ftp.cdf-ms, Ftp.manifest, Jazz.cdf-ms, Jazz.exe.cdf-ms and missing objects were Templates.xml and FtpLicense.xml. (FTP is a third-party library that I have licensed for this application).
The two functions which depend on these xml objects don't work. Everything else seems to be OK. Everything (including these two functions) work OK with the debugger.
I'm also puzzled by the fact that if I publish the application with option "The application is available online only" it doesn't work at all, throwing message "Application cannot be started. Contact the application vendor". However if I use the option "The application is available offline as well" it works, albeit with the problems above. I don't know if this is a separate problem or part of this one.
I hope somebody can help me, because I've run out of ideas. I've tried to find the answer through MSDN and Google, but nothing leaps out at me.
Regards, Robert.