Solved

Help with using ClickOnce technology with VS 2010

Posted on 2014-02-14
22
313 Views
Last Modified: 2014-02-16
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
Comment
Question by:vcharles
  • 17
  • 3
  • 2
22 Comments
 
LVL 12

Expert Comment

by:ktaczala
ID: 39860925
0
 

Author Comment

by:vcharles
ID: 39860957
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
 

Author Comment

by:vcharles
ID: 39860986
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
 
LVL 12

Accepted Solution

by:
ktaczala earned 300 total points
ID: 39861395
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
 

Author Comment

by:vcharles
ID: 39861422
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39861474
You were using a setup project. Are you now using ClickOnce instead? Or using ClickOnce to distribute the setup project?
0
 

Author Comment

by:vcharles
ID: 39861491
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39861496
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
 

Author Comment

by:vcharles
ID: 39861519
Yes, it's set to include, I tried following the path, but I don't have an AppData subfolder under the victor folder.
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 200 total points
ID: 39861547
It would be hidden.
0
 

Author Comment

by:vcharles
ID: 39861577
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:vcharles
ID: 39861599
Running more test, Bin folder was excluded from the project.
0
 

Author Comment

by:vcharles
ID: 39862028
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
 

Author Comment

by:vcharles
ID: 39862169
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
 

Author Comment

by:vcharles
ID: 39862177
Please disregard last post, solved that issue but still running into other issues.
0
 

Author Comment

by:vcharles
ID: 39862225
Is it possible for users to run the application directly from a CD?
0
 

Author Comment

by:vcharles
ID: 39862248
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
 

Author Comment

by:vcharles
ID: 39862249
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
 

Author Comment

by:vcharles
ID: 39862879
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
 

Author Comment

by:vcharles
ID: 39862918
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
 

Author Comment

by:vcharles
ID: 39863024
Database connection issue was solved, but unable to view report, will close this issue.

Thanks.
0
 

Author Closing Comment

by:vcharles
ID: 39863028
Thanks!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now