Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Conlisk 432 posts 1008 karma points
    Mar 30, 2009 @ 11:19
    David Conlisk
    0

    Site keeps "upgrading" to 4.0.1, then back to 4.0.0. [SOLVED]

    Hi all,

    I upgraded my site to v4.0.1 from v4.0.0. I copied the files in, ran the upgrader, everything is fine. However, when I update a reference to a dll in the project, it kicks off the "upgrade" to upgrade the site back down to version 4.0.0.

    If I update the web.config to set umbracoConfigurationStatus to "4.0.0" then it's fine and dandy, but obviously I'd like to know what's going on.

    How do I find out why it's trying to "upgrade" back to v4.0.0? Where does this check happen?

    Thanks,

    David

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Mar 30, 2009 @ 11:25
    Niels Hartvig
    0

    Do you have anything in your VS solution that automatically copies all dlls from your solution to your website? In that case an old referenced businesslogic.dll (v4.0.0) could be copied to your website and ovenwritten the 4.0.1.

  • David Conlisk 432 posts 1008 karma points
    Mar 30, 2009 @ 11:44
    David Conlisk
    0

    Hi Niels,

    Thanks for getting back to me so quickly. I'm still having this issue, so let me run the situation past you. I have a WebGarden.Utilities class library which is still in development, so it's getting compiled and recompiled as I develop my site. The website has a reference to it that I update through VS after each re-compile.

    I also have a User Controls web application project for the site, which uses post-build events:

    [code]
    xcopy /Y /S /F "$(TargetPath)" "C:\Webroot\ProjectName\bin"

    xcopy /Y /S /F "C:\Projects\Project
    Name\UserControls*.ascx"
    "C:\Webroot\Project_Name\usercontrols\"
    [/code]

    So it's copying across the compiled dll for the user controls, plus the .ascx files required.

    So: what's the solution here? The up-to-date dlls are in the website /bin folder. And I copied the new dlls into my other projects and re-compiled everything. However, I'm still getting the Umbraco 4.0.0 upgrade wizard!

    Am I missing something?

    Thanks,

    David

  • David Conlisk 432 posts 1008 karma points
    Mar 30, 2009 @ 11:52
    David Conlisk
    0

    Ok that solved it - your suggestion was correct, Niels. I had created my own little dll hell!

    I copied the latest versions of the dlls into the /bin folder of the website.

    I updated the references for businesslogic, cms and umbraco in my utilities class library to point to these new files in the website /bin folder and recompiled the project.

    I copied the latest versions of the dlls into the /bin folder of my usercontrols web application and recompiled that.

    Now all three projects are using the same versions of the dlls as expected and the "upgrade" wizard is happy (web.config reads 4.0.1).

  • Daniel Lindstrom 454 posts 271 karma points
    Mar 30, 2009 @ 12:07
    Daniel Lindstrom
    0

    Been there, done that!

    A tip for anyone using post build actions:

    To avoid this issue, make sure your custom dlls etc start with a common prefix and be more specific with the xcopy command, something like this:

    [code]
    xcopy /Y /S /F "$(TargetPath)[prefix]." "C:\Webroot\Project_Name\bin"
    [/code]

    If your code references other custom dlls that do not start with this prefix you will have to add those as separate xcopy commands. Anything to avoid overwriting the core umbraco stuff!

  • David Conlisk 432 posts 1008 karma points
    Mar 30, 2009 @ 12:16
    David Conlisk
    0

    Thanks daniell - thing is, when I run the post-build event:

    [code]
    xcopy /Y /S /F "$(TargetPath)" "C:\Webroot\Project
    Name\bin"
    [/code]

    only one file gets copied, my UserControls.dll (as expected).

    The problem in this case was my class library referencing the old versions of the dlls. Then my website referenced my class library. Every time I updated the reference (right-click on the reference in Visual Studio and choose 'update reference') that was when the problems started again (because the class library was referencing older dlls).

    I suppose I'll need to have a different version of my class library for different Umbraco versions, where each version references the correct dlls.

  • Daniel Lindstrom 454 posts 271 karma points
    Mar 30, 2009 @ 12:48
    Daniel Lindstrom
    0

    Ahh, OK I see, it was not exactly the same problem we have experienced then. I missunderstood.

Please Sign in or register to post replies

Write your reply to:

Draft