upgradeRequired is always returned as true for an upgraded VS2010 project RRS feed

  • Question

  • Hello,

    I have a VSIP package which is built using VS2005 SDK and VS2010 compiler.
    On solution load, I listen to IVsSccEnlistmentPathTranslation::TranslateProjectPathToEnlistmentPath method and call IVsProjectUpgradeViaFactory.UpgradeProject_CheckOnly Method to check whether any project/solution requires an upgrade. Based on this return value I take some necessary steps.

    For a specific VS2010 solution( with multiple projects and solution folders and upgraded from VS2008), I always get the pUpgradeRequired value as TRUE.

    When the same solution is opened in VS2012(VS2010 soln can be opened in VS2012 without an upgrade) I get the appropriate value for pUpgradeRequired.

    Also, when I reorder the contents of .sln file (move all the solution folders' "Project - EndProject" section below the project's "Project - EndProject" section) I get the appropriate value for pUpgradeRequired.

    Has anyone encountered any similar issue, if so what was the resolution?
    Is this a known issue in VS2010 which is later fixed in VS2012?


    P.S: I cannot share the solution/ project data

    Monday, February 25, 2013 12:48 PM

All replies

  • Hello Bharath,

    I'm glad this is not a problem in VS2012. We made upgrade/migration improvements in VS2012 and we may have directly/indirectly resolved your issue.

    I would recommend ensuring you're working with VS 2010 SP1 if you're not already doing so when investigating this issue in VS2010. It may not necessarily resolve your issue, it's just the minimum build we recommend VS2010 customers to be using.

    If you can reproduce the issue with a set of sample projects and a solution which you feel safe to share, please file a report in our connect page and we may take a look in VS2010SP1 to see if we can provide you with a more detailed reason why you're seeing that behaviour.



    • Edited by Kendagor Monday, February 25, 2013 9:04 PM
    Monday, February 25, 2013 9:03 PM
  • Hello Kendagor,

    Thanks for your immediate reply.

    I am using VS2010 SP1.

    Its been tricky to get a sample solution, hence I wanted to know if someone had encountered similar issue or Microsoft has solved similar issue in VS2012. If I get a sample solution I will file the report in connect.



    Tuesday, February 26, 2013 5:35 AM
  • Hi,

    I will involve some experts into this issue to see whether they can help you out. There might be some time delay, appreciate for your patience.
    Thank you for your understanding and support.
    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 27, 2013 6:53 AM
  • Hello Bharath,

    I have not seen such an issue relating to pUpgradeRequired not consistent as a result of the order of projects being queried (since you can work around this failure when you rearrange your projects in the solution). I look forward to seeing the sample in connect when you get a chance.

    I'm double-glad as well you have a workaround.



    Wednesday, February 27, 2013 8:32 PM
  • Hi Kendagor,

    I found the pattern to hit the problem now. Will report the same on connect.

    In a brief, pUpgradeRequired returns TRUE only when

    • solution is opened from outside of VS2010, say Windows Explorer.
    • Solution must contain solution folder, say "Folder1"
    • also, there must be a physical folder with the same name(Folder1) in the same hierarchy as .sln file

    When I rename either the physical folder or the solution folder, issue is not seen. That's a defect on VS2010 from my perspective. Will report the same on connect.



    Thursday, February 28, 2013 12:30 PM
  • Hi Kendagor,

    It seems like I wont get any help in connect. Could you take a look at the project I have shared there? Can you shed more info with the steps I have provided?



    Monday, March 4, 2013 6:08 AM