Перейти к основному контенту
Центр разработки для Windows

Updating a current deployment to .Net 3.5 RRS feed

  • Вопрос


    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 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.


    Thanks in advance,



    18 марта 2008 г. 18:55


  • You have to have the users install the prerequisite. (Over a year later, I know much, much more about ClickOnce deployment!).

    I created a solution to handle the case of the expiring certificate, where you have your ClickOnce application uninstall itself and then install a new version. When installing the new version, you can call the setup.exe which will install the prerequisites.

    We are going to upgrade to .Net 3.5 later this summer, and when we do that, we will use this same method -- have the application programmatically uninstall itself and then install the new one, invoking the setup.exe (from a differnet url) with the prerequisites set to .Net 3.5.

    Here's a blog article about it that gives all the code:


    If you are in a corporate environment, you can get .Net 3.5 pushed to your users' machines, and then just change the prerequisite and redeploy an update and it will work. We don't have that luxury, and don't know if all of our users have .Net 3.5 installed.

    Another thing to note (another blog posting on the robindotnet.wordpress.com blog) is that Microsoft is now pushing .Net 3.5 SP-1 to any machine with any version of .Net on it as an automatic update.

    (RobinS., GoldMail.com)
    Click here to visit my ClickOnce blog!
    18 июня 2009 г. 7:27

Все ответы