Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install or run the application: Click Once

Tags:

.net

clickonce

I published my .net application using ClickOnce, and all my users get the following error message on trying to open the program:

"Unable to install or run the application. The application requires that assembly Telerik.Windows.Data Version 2012.1.215.40 be installed in the Global Assembly Cache (GAC) first".

The version I actually use in my application is NEWER than the one mentioned in the error message. I also don't have this problem on my machine which I use to develop the application. I wonder why it is looking for the older version of the dll. I can't find where it is referenced by my application.

Could you please help me on this?

like image 203
David Shochet Avatar asked Jul 16 '12 13:07

David Shochet


People also ask

What is a one click application?

What is a ClickOnce application? A ClickOnce application is any Windows Presentation Foundation (. xbap), Windows Forms (.exe), console application (.exe), or Office solution (. dll) published using ClickOnce technology.

How do I turn off ClickOnce security settings?

To disable ClickOnce security settings With a project selected in Solution Explorer, on the Project menu, click Properties. Click the Security tab. Clear the Enable ClickOnce Security Settings check box.

How do I clear my ClickOnce cache?

To delete the ClickOnce file cache, delete the contents of this folder based on the operating system. Deleting these files will clear the information for all installed ClickOnce applications. They'll reinstall the next time their shortcut or Uniform Resource Identifiers (URIs) are used.

What is the purpose of ClickOnce deployment?

ClickOnce allows you to deploy windows based applications to a client system using the web or file server. The application files are placed on the web or FTP site or local share and the user is provided with a link in case of web and FTP deployment.


2 Answers

I found solution here:

http://ablogontech.wordpress.com/2009/01/02/unable-to-install-or-run-the-application-the-application-requires-that-the-assembly-be-installed-in-the-global-assembly-cache-gac-first/

Excerpt from wordpress link:

I recevied this error while compiling my first C# production application. I had to do the following in Visual Studio for the project:

  1. In Solution Explorer, expand the References node and click the assembly listed in the error. Ensure Copy Local in the Properties grid is set to ‘True’.
  2. In the properties of the project, Publish | Application Files Tab, ensure the Publish Status for the assembly listed in the error is set to ‘Include’
like image 94
David Shochet Avatar answered Oct 06 '22 15:10

David Shochet


In my case, the problem caused this error message was of incorrect library publishing configurations.

When i set my library property CopyLocal = false, and then in project publish application files set Publish Status to Include, all works fine after project rebuilding and next publishing.

Thus we tell to ClickOnce compiler, not to publish this library with application by default, and by changing Publish State from Prerequisites to Include tells ClickOnce, not to search this library in GAC.

like image 28
Fragment Avatar answered Oct 06 '22 15:10

Fragment