locked
How to: Migrate C++ VSPackages to Visual Studio 2010 RRS feed

  • Question

  • Hi Nancy,

          It would be nice if the post: Migrating VSPackages to Visual Studio 2010

    also explained "Migrating C++ VSPackages to Visual Studio 2010", say using VS2008 SDK VSX Samples.

    As I am now migrating my VSPackages which work well in both VS2005 & VS2010 to VS2010, the .vcproj & the .sln file convert very well to .vcxproj & .sln respectively but throws this error: "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 9009."

    The above error is also thrown when I try to migrate the VS2008 sample to VS2010 ie. C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Samples\IDE\Cpp\Reference.ToolWindow.

    VS2010 converts the above VS2008 sample but throws the above error, when I build. Any idea how to fix the same?

    Cheers,
    Venkat

    Monday, May 17, 2010 5:37 AM

Answers

  • Hi Venkay,

    The best suggestion I can make here is to create a new ATL/C++ package with VS 2010, and then review the vsproj file and project settings, and ensure you have similar settings added to the project you ported to VS 2010.

    If you're goal is to target VS 2005, 2008 and 2010, I would recommend continuing to build your package with the earlier version of VS and use a VSIX project to register the package for VS 2010.


    Ed Dore
    • Proposed as answer by Nancy Shao Friday, May 21, 2010 7:24 AM
    • Marked as answer by Nancy Shao Tuesday, May 25, 2010 7:58 AM
    Thursday, May 20, 2010 1:05 AM

All replies

  • Hi Venkat,

    Thanks for your post.

    I can't repro this in my side, could you please post detailed steps here for me to repro this? About error 9009 message, I find a very useful information about .NET tool "exited with code 9009" . But cmd.exe is not .NET tool. So I don't think it is in the case.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, May 17, 2010 7:29 AM
  • Hi Nancy,

                    Thanks for your reply.

    All installations have been done on a Clean Virtual Machine with Win XP+SP3 with VS2010 Professional (Microsoft Visual Studio Version 10.0.30319.1 RTMRel).

    Pre-requisites are VsSDK_sfx.exe from  Visual Studio 2010 SDK RC. To be safer, I have also installed the Isolated (  Visual Studio 2010 Shell (Isolated) RC ) & Integrated Shells ( Visual Studio 2010 Shell (Integrated) RC  ) for VS2010.

    The steps are as follows:

    1. Navigate to the VS2008 samples dir:  C:\Program Files\Microsoft Visual Studio 2008 SDK\VisualStudioIntegration\Samples\IDE\Cpp\Reference.ToolWindow which is an ATL C++ Sample.

    2. Start VS2010 IDE.

    3. Open  ToolWindow.sln from VS2010, in the above directory (in Step 1).

    4. Build the above project.

    5. The error thrown is: "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 9009."

    Please let me know if you need more info.

    Cheers,

    Venkat

    • Edited by VENKATESH PAI Tuesday, May 18, 2010 3:00 PM Updated Links
    Tuesday, May 18, 2010 2:48 PM
  • Please find our latest samples at http://code.msdn.microsoft.com/vsx#VS2010Samples

    It should steer you in the right direction.  Also worth mentionning, when developping a package, you do not need the isolated nor the integrated shell redistributable.

     


    Carl Brochu, Visual Studio
    Tuesday, May 18, 2010 7:59 PM
  • Hi Venkat,

    Based on my research, I guess this issue is caused by VSPackage with Visual C++ made some changes in Visual Studio 2010. And Visual C++ solutions and projects are now built by using MSBuild.exe which was used to use VCBuild.exe, when we use conventor to upgrade to Visual Studio 2010, it might be missing some settings. I'm not sure about it.

    I found a thread VSPackage for VS 2005, 2008 and 2010, please refer to Ed's answer, may it will give you some hints.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, May 19, 2010 9:41 AM
  • Thanks Nancy & Carl.

    I had installed Isolated & integrated Shells for VS2010, to be on the "safer side" even though I knew that they are not needed for development.

    The thread VSPackage for VS 2005, 2008 and 2010 has some useful information but is not helpful enough to resolve my issue.

    As you have rightly said that there are some settings which may be needed when I migrate the ATL C++ VS2008 Sample to VS2010. I need to find that, so that I could apply the same to my VSPackages, which work well on both VS2005 & VS2008 but unable to migrate to VS2010.

    If you or Carl or anyone who reads this thread get any info, kindly share the same.

    Cheers,

    Venkat

    Wednesday, May 19, 2010 2:12 PM
  • Hi Venkay,

    The best suggestion I can make here is to create a new ATL/C++ package with VS 2010, and then review the vsproj file and project settings, and ensure you have similar settings added to the project you ported to VS 2010.

    If you're goal is to target VS 2005, 2008 and 2010, I would recommend continuing to build your package with the earlier version of VS and use a VSIX project to register the package for VS 2010.


    Ed Dore
    • Proposed as answer by Nancy Shao Friday, May 21, 2010 7:24 AM
    • Marked as answer by Nancy Shao Tuesday, May 25, 2010 7:58 AM
    Thursday, May 20, 2010 1:05 AM