Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy my DLLs to GAC for use with ClickOnce App

How do I do it? Is there any reason I shouldn't?

I have a winform ClickOnce App that has about 13mbs in DLLs that are not mine so I would have no need/ability to update them at any regular intervals.

DevExpress(3), Microsoft ReportViewer, Microsoft SQL Replication. Microsoft SQL SMO.

Without them being included in my ClickOnce App my whole program comes in at about 1.5mbs and with our remote sites having limited vpn connectivity I really need to get it down there. I can't send 15mbs across our network to all users everytime I make a minor app change.

Thanks


UPDATE FOR CLARITY

For clarification; I do not want to install my DLLs to the GAC with ClickOnce. ClickOnce is what my main app needs to use. I want to remove that 13mbs of DLLs from the ClickOnce App and get them installed for use on all the local systems.

If I can accomplish this with out the GAC, fantastic. I just need my main app trimer so updates.

like image 285
Refracted Paladin Avatar asked Jul 08 '09 19:07

Refracted Paladin


People also ask

How do I add files to ClickOnce deployment?

On the File menu, click Open to open your application manifest. Select the Files tab. In the text box at the top of the tab, enter the directory that contains your application's files, and then click Populate. Your data file will appear in the grid.

How do I manage updates for a ClickOnce application?

Click the Publish tab. Click the Updates button to open the Application Updates dialog box. In the Application Updates dialog box, make sure that the check box The application should check for updates is selected. In the Choose when the application should check for updates section, select After the application starts.


2 Answers

Expanding on @kanad's response...

Your 13MB of dlls will only be downloaded by users the first time they install the application. That's one of the big advantages of ClickOnce, users only have to download files that have changed.

However, the confusing thing is that the ClickOnce progress dialog always shows the entire size of your application even though it may not be downloading the entire application. I did extensive testing to make sure this was the case and proved it to myself using a bandwidth monitor.

Finally, if you have control over your web server you might want to consider enabling compression for your ClickOnce applications. It helps reduces the download size considerably. Compression is kind of a pain to set up, but this article should get you started. However, once again, the compressed size is not reflected in ClickOnce progress dialog.

The best thing to do is just ignore the number that shows up on the ClickOnce progress dialog :)

like image 193
codeConcussion Avatar answered Sep 23 '22 01:09

codeConcussion


Clickonce can't install files into the GAC. You'd need to create an MSI or elevated privileges to do it.

Generally you should avoid the GAC unless it solves a specific problem. Is the install size more of a pain than the ClickOnce download- are users using 50K modems, or a high speed LAN?

Chris Sells has a great article on why you should avoid the GAC, and there are various other stack overflows posts on it- see here, here and here.

At the end of the day you need to evaluate the pros and cons and decide what is the best course of action.

like image 39
RichardOD Avatar answered Sep 20 '22 01:09

RichardOD