• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Help with using ClickOnce technology with VS 2010

Hi,

When I try to publish my application to a folder in my PC, I receive the following error:

Error      10      Cannot publish because a project failed to build.            1      1      TestWindows

However when I try to build my setup project I don't receive any errors, any ideas what is the problem? I would like to publish my application to a folder, copy it to a CD and install it in a webserver or another PC without the need for admin rights.

Thanks,

Victor
0
vcharles
Asked:
vcharles
  • 17
  • 3
  • 2
2 Solutions
 
vcharlesAuthor Commented:
Hi,

Thanks for the link, I was able to create the setup file, but unable to install it because I also need crystal Report Runtime file installed. How do I also include the .exe for this file in my ClickOnce  setup application?

Will the required runtime file for crystal Report cause a problem when I need to install the application to a web server or shared network?

Victor
0
 
vcharlesAuthor Commented:
Hi again,

I just noticed another problem, when I remove crystal report from the project, I am able to install the it but when I try to run it,  it couldn't find a file that is included in a subfolder of the application. How do I also make sure the subfolder is included when I publish the application?

Victor
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
ktaczalaCommented:
Are you using the .net  or com references from Visual Studio?  Check Publish | Application Files, make sure your references are included & required.  Also make sure that crystal reports is checked under prerequisites.  As far as adding a file, add it as a resource and make sure that copy always is selected for the property of the file.
0
 
vcharlesAuthor Commented:
I'm using .net references. The LinkFiles subfolder is part of the package and all files end with deploy (i.e. Link.xml.Deploy) but when I run the app, it states the file can't be found.
0
 
CodeCruiserCommented:
You were using a setup project. Are you now using ClickOnce instead? Or using ClickOnce to distribute the setup project?
0
 
vcharlesAuthor Commented:
Yes, I'm trying to use ClickOnce instead to allow users without admin rights to install the application and also to give them options to install it in a web server.

I was able to include the required files from the applications section but when running the application it can find the ACCESS database, I created a Data folder to include the file but I still get the same error message:

System.Data.OleDb.OleDbException (0x80004005): Could not find file 'C:\Users\victor\AppData\Local\Apps\2.0\Data\XX7E5MQJ.90P\MYGD69NZ.PRA\aop-..tion_e1fbd57d1a593806_0001.0000_63686cbedb112f93\Data\AOPT2002org.mdb'.

The application is installed c:\DeployA folder, not sure why it's looking for the database in the path listed in the error message.

How do I fix that problem?


V.
0
 
CodeCruiserCommented:
Its probably because you are using relative path for accessing the database. ClickOnce apps are installed in app data folder for each user. On the "Application Files" dialog, is the Access DB set to "Include" ?
0
 
vcharlesAuthor Commented:
Yes, it's set to include, I tried following the path, but I don't have an AppData subfolder under the victor folder.
0
 
CodeCruiserCommented:
It would be hidden.
0
 
vcharlesAuthor Commented:
The database is accessed using the following code:

 Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\AOPT2002org.mdb;Persist Security Info=True;Jet OLEDB:Database Password=popsswd"
        Dim objConnection As New OleDb.OleDbConnection(ConnectionString)

Could that be part of the problem?  I added it as an exiting item but in the applications Files files section it states the database is not referenced in the project, with a yellow triangle to the left of it.
0
 
vcharlesAuthor Commented:
Running more test, Bin folder was excluded from the project.
0
 
vcharlesAuthor Commented:
Hi,

The file is my my Bin/Debug folder and in Applications Files it shows included, but when I run the application, it still can't be found. Any ideas what is wrong?
0
 
vcharlesAuthor Commented:
Hi again,

How do I avoid the following error?

Unable to install or Run the application. The application requires that assembly C1.Win.C1TrueDBGrid4 Version 4.020132.61313 be installed in the Global Assembly Cache (GAC) first."

Victor
0
 
vcharlesAuthor Commented:
Please disregard last post, solved that issue but still running into other issues.
0
 
vcharlesAuthor Commented:
Is it possible for users to run the application directly from a CD?
0
 
vcharlesAuthor Commented:
It's working but I get prompted for a password to access the ACCESS database to view a report in crystal report, even though the password is already entered in the code and when I type in the password from the dialog box, I'm still getting log in failed error message. Is this issue with crystal report or the Setup? How do I fix it? This issue does not occur when I create a setup project with windows Installer.

Thanks,

V.
0
 
vcharlesAuthor Commented:
Below is the code I'm using to access the ACCESS file.

Dim myaop6viewer As New AOP6VIEWER
        Dim myreport As New RPTTest
        Dim crConnectionInfo As ConnectionInfo = New ConnectionInfo
        crConnectionInfo.ServerName = (Application.StartupPath & "\AOPT2002org.mdb")
        crConnectionInfo.Password = "poaxiswd"
        setDBLogonForReport(crConnectionInfo, myreport)
0
 
vcharlesAuthor Commented:
Hi,

I added the necessary DLLs to solve the issue with crystal Report but I can't figure out why when I install the application on the development PC all is working ok but when I try to install it on another PC, I receive error message the ACCESS file can not be found, any ideas why the installation only works on the development PC?
0
 
vcharlesAuthor Commented:
Could this connection string be the cause of the problem? I removed the password to avoid the login issue.

  Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\AOPT2002org.mdb;Persist Security Info=False;Jet OLEDB:Database"
0
 
vcharlesAuthor Commented:
Database connection issue was solved, but unable to view report, will close this issue.

Thanks.
0
 
vcharlesAuthor Commented:
Thanks!
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 17
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now