ClickOnce and GAC

I have a WinForms.net 3.5 application. I deploy it using clickonce on an intranet with multiple client machines. I am publishing the application on the intranet web server ( http: // desbiz / CarwinClickOnce ).

In a developer environment (my computer), my application uses GAC assemblies such as Fk.Security.Common.dll v.1.0.0.0.

In the Publish โ†’ Application Files tab of the WinForms csproj Properties application, I set the Include value for the Fk.Security.Common.dll link.

Now

some client machines have a link Fk.Security.Common.dll v.1.0.0.0 in the GAC

Other clients have NOT Fk.Security.Common.dll v.1.0.0.0 link in GAC

If the client installs the winform application using ClickOnce, the following problems occur:

1.) If the Fk.Security.Common.dll v.1.0.0.0 link is in the GAC, the Fk.Security.Common.dll v.1.0.0.0 link included in ClickOnce is not applied.

Problem: it is possible that the compilation code in the Fk.Security.Common.dll v.1.0.0.0 link included in ClickOnce is more updated than the code in the Fk.Security.Common.dll v.1.0.0.0 link in the GAC

Solution: Remove the Fk.Security.Common.dll v.1.0.0.0 link in the GAC and set the Gk Fk.Security.Common.dll v.1.0.0.0 link included in the ClickOnce publication ...

(how can I remove / install assemblies in the GAC using ClickoNce ????)

2.) If the Fk.Security.Common.dll NOT link is in the GAC, the Fk.Security.Common.dll v.1.0.0.0 link included in ClickOnce is used. No problems.

Note: the user on the client machine has administrator rights.

Any solution on these issues?

Thanks in advance.

+4
source share
3 answers

ClickOnce cannot install or remove files in the GAC.

Are you writing Fk.Security.Common.dll? If so, increase the version number (v.1.0.0.1) and recompile it. When you reference it, set the Specific Version property to True and Version for your new version number. This should fix your problem without removing the old build from all GACs.

+5
source

In the Visual Studio project, click on the assembly link (Fk.Security.Common.dll), and in the properties window set the Copy local property to True (I assume that you are using ClickOnce)

+2
source

Cannot install or run the application. The application requires you to install the Telerik.Windows.Data Version 2012.1.215.40 assembly in the global assembly cache (GAC).

I had the same error when I forgot to change the solution configuration from "Debug" to "Release" in Visual Studio. Before posting.

+2
source

Source: https://habr.com/ru/post/1301327/


All Articles