locked
Why is my new project wizard that works in VS2008 failing in VS2010? RRS feed

  • Question

  • I have created a couple of project wizards (for C++ projects) that work fine in VS2008.  When I tried to install and use them in VS 2010, I get the following error message:

    "File name or class name not found during Automation operation."

    The wizard has a couple of pages for settings.  Interaction with the wizard UI seems to work fine, but when I click the "Finish" button, I get the error.  No files or directories are actually created.  I am not very experienced with wizard development.  Is there any way to step through the js code to determine exactly what is failing?  Is there any documentation on classes that are no longer supported in VS2010?

    Tuesday, October 5, 2010 12:37 PM

Answers

  • Hi Wayne,

    I wasn't able to track that error message back to a particular exception or error in the VS codebase. Your best bet would be to try debugging this scenario. That is, launch 2 instances of VS 2010, attach one to the other via "Debug.Attach To Process" menu. There is a "Select" button in the "Attach to Process" dialog, and you can select "Script" to do script debugging if you think the issue is originating in the jscript. Then create an instance of your project in the instance being debugged, and see if you can isolate where the error is coming from.

    Sincerely,


    Ed Dore
    Friday, October 15, 2010 5:37 PM

All replies

  • Hi Wayne,

    I wasn't able to track that error message back to a particular exception or error in the VS codebase. Your best bet would be to try debugging this scenario. That is, launch 2 instances of VS 2010, attach one to the other via "Debug.Attach To Process" menu. There is a "Select" button in the "Attach to Process" dialog, and you can select "Script" to do script debugging if you think the issue is originating in the jscript. Then create an instance of your project in the instance being debugged, and see if you can isolate where the error is coming from.

    Sincerely,


    Ed Dore
    Friday, October 15, 2010 5:37 PM
  • Ed,

    Sorry I am so slow in responding.  I was out of the office for awhile.

    I have not been successful in debugging.  I tried loading the wizard project in VS2008 and attaching to an instance of VS2010, but I did not hit any breakpoints.

    Then I tried opening the wizard project in VS2010, but I got the following error message:

    Class not registered.

    Looking for object with CLSID: {D9B3211D-E57F-4426-AAEF-30A806ADD397}.

    Do you know why VS2010 cannot open the project?

    Wayne

    Tuesday, October 26, 2010 4:00 PM
  • Ed,

    It turns out that the failure happened when I tried to create a project by calling the _Solution.AddFromTemplate method.  The path that I was passing in for the project template file was named "default.vcproj".  For VS2010, the default template should be "default.vsxproj".  Do you know if there is a programmatic way to determine the correct default template filename (or at least the correct project extension)?

    Thanks.

    Wayne

    Wednesday, October 27, 2010 2:44 PM
  • Hi Wayne,

    I don't believe there are any APIs or settings that would give you this file name. Your best bet would be to test which environment you are running under and then use the appropriate project template file. The DTE object has a Version property that you could use for this purpose.

    Sincerely,


    Ed Dore
    Wednesday, October 27, 2010 4:47 PM