Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

ClickOnce updates and changing the prerequisite .Net Framework version

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobinS - 18 Mar 2008 19:58 GMT
We are currently targeting .Net 2.0 and including it as a prerequisite.

We want to upgrade to .Net 3.5 to use some of the new handy-dandy features.

I changed the Target Framework to .Net 3.5 and changed the prerequisite to
.Net 3.5.

When the user runs the application and it picks up the update, it won't
install, saying:

Unable to install or run the application. The application
requires that assembly WindowsBase Version 3.0.0.0 be
installed in the Global Assembly Cache (GAC) first.

This wasn't unexpected, but I'm wondering if anybody knows of a way around
this, so I don't have to have all of my users deinstall and reinstall our
application. The only thing I've thought of so far is to have all of our
customers go out and install .Net 3.5 themselves, but the chances on selling
that to the Powers That Be is pretty slim.

Thanks in advance,
RobinS.
GoldMail.com
Peter Ritchie [C# MVP] - 18 Mar 2008 21:06 GMT
I don't know if there's specific guidance on this.

I expect that you should be changing the GUID of the application and the new
install would include something to remove the other version.  With clickonce
already thinking a version with a specific GUID is already installed, it
doesnt install the prerequisites on an upgrade.
Signature

Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#

> We are currently targeting .Net 2.0 and including it as a prerequisite.
>
[quoted text clipped - 19 lines]
> RobinS.
> GoldMail.com
RobinS - 18 Mar 2008 21:23 GMT
Thanks for the info, but ClickOnce does not remove previous versions. It
only updates them. Also, I'm not sure it cares about the GUIDs. It checks
the manifest files for versioning and signing. I don't remember GUIDs being
mentioned anywhere in Brian Noyes' ClickOnce book.

How would you change the GUID on an application? I can test and see if that
works, although I admit to being skeptical.

RobinS.
GoldMail.com

>I don't know if there's specific guidance on this.
>
[quoted text clipped - 32 lines]
>> RobinS.
>> GoldMail.com
RobinS - 19 Mar 2008 16:49 GMT
I asked Brian Noyes (the author of the most excellent ClickOnce book) this
question. He said you can't do it through updates. The users have to
reinstall the application by running the setup.exe that will install the
prerequisites.

RobinS.
GoldMail.com

> Thanks for the info, but ClickOnce does not remove previous versions. It
> only updates them. Also, I'm not sure it cares about the GUIDs. It checks
[quoted text clipped - 44 lines]
>>> RobinS.
>>> GoldMail.com
Steve Gerrard - 20 Mar 2008 03:22 GMT
> I asked Brian Noyes (the author of the most excellent ClickOnce book)
> this question. He said you can't do it through updates. The users
> have to reinstall the application by running the setup.exe that will
> install the prerequisites.

Oh yeah, the setup.exe, which is separate from the MyApp.application file that
does the actual ClickOnce install/update.

However, it seems to me that you could send around a link for users to rerun the
setup, then have them start their update in the usual way. Once the setup.exe
has been run again, the ClickOnce app should be able to update. No need to have
users uninstall. I think...
RobinS - 20 Mar 2008 07:16 GMT
>> I asked Brian Noyes (the author of the most excellent ClickOnce book)
>> this question. He said you can't do it through updates. The users
[quoted text clipped - 8 lines]
> the setup.exe has been run again, the ClickOnce app should be able to
> update. No need to have users uninstall. I think...

Yeah, my problem is I don't think we can trust them to actually RUN the
setup.exe. You know how it is -- you get an e-mail, you're busy and intend
to get back to it later, and before you know it, it's been a week, or a
month.

I had an idea about adding the .Net 3.5 framework to the deployment package,
and having the application run it after it updates. The problem with this is
if a user does not run the application soon, there could be new updates
deployed w/o the .Net 3.5 part.

As I said in my other post, I think the best thing I can do at this point is
write a plan for changing over to .Net 3.5 and see if I can sell it to my
management. There are some other things I've been wanting to change, and I
may be able to kill multiple birds with one stone.

Thanks for the ideas.
RobinS.
GoldMail.com
kimiraikkonen - 19 Mar 2008 19:54 GMT
> We are currently targeting .Net 2.0 and including it as a prerequisite.
>
[quoted text clipped - 19 lines]
> RobinS.
> GoldMail.com

Robin,
It may be a hard and temporary solution but, write a mini application
that copies the required assembly to the correct location using
system.io as acting a kind of autorun / leading application that'll
run before your main software, then install your main software with
any installer if you're not obsessed to ClickOnce.

Regards.
RobinS - 20 Mar 2008 07:12 GMT
On Mar 18, 8:58 pm, "RobinS" <rob...@imnottelling.com> wrote:
> We are currently targeting .Net 2.0 and including it as a prerequisite.
>
[quoted text clipped - 21 lines]
> RobinS.
> GoldMail.com
-
-Robin,
-It may be a hard and temporary solution but, write a mini application
-that copies the required assembly to the correct location using
-system.io as acting a kind of autorun / leading application that'll
-run before your main software, then install your main software with
-any installer if you're not obsessed to ClickOnce.
-
-Regards.

That's an interesting idea. Unfortunately, the "required assembly" is the
.Net 3.5 framework, so I'm not sure that will work. Additionally, we have
chosen ClickOnce as our deployment method, and do not want to change that.

We have considered sending out an e-mail to all clients asking them to
install .Net 3.5, but we can't trust them to actually do it.

My best idea is to deploy the 3.5 targeted version to a new URL, and put a
dialog box up on the old version saying "you have x days to upgrade to the
new version" and give them the URL for the new version. Then if people don't
run the old version for a while, next time they run it, they will know how
to upgrade.

Thanks,
RobinS.
GoldMail.com

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.