locked
Cannot add a Property Page with a User Wizard RRS feed

  • Question

  • Hi!

    Visual Studio 2010.

    I have build a custom wizard which generates a frame for an application. I will also add a property page to this new project, but that does not work.

    I found a similar question within this forum, but the answer given does not work too.

    Here what I made:

    function AddConfig(proj, strProjectName)
    
    {
    
     try
    
     {
    
      //-------------------------------------------------
    
      var config = proj.Object.Configurations('Debug');
    
      //-------------------------------------------------
    
      var propertySheets = config.PropertySheets;
    
      propertySheets.AddPropertySheet("R:\\MCLIB\\APPLICATIONS\\ApplicationProperties.props");
    
     }
    
    }
    
    
    
    Error Message:
    
    	Object doesn't support this property or method
    
    	System.NotSupported Exception
    
    
    
    
    function AddConfig(proj, strProjectName)
    
    {
    
     try
    
     {
    
      //-------------------------------------------------
    
      var config = proj.Object.Configurations('Debug');
    
      //-------------------------------------------------
    
      config.AddPropertySheet("R:\\MCLIB\\APPLICATIONS\\ApplicationProperties.props");
    
     }
    
    }
    
    
    
    Error Message:
    
    	Variable uses an Automation type not supported in JScript
    
    	System.NotSupported Exception
    
    
    
    

    How is the correct syntax for solving this problem?

    Thanks and best Regards
    Walter

     

    Tuesday, November 30, 2010 9:49 AM

All replies

  • Hi Walter,

     

    Thanks for your post.

    Could you please try the following code instead?

     

    VCProject vcproj = proj.Object As VCProject;

    VCConfiguration vcconfig = vcproj.Configurations("Debug");
    vcconfig.AddPropertySheet(
    "R:\\MCLIB\\APPLICATIONS\\ApplicationProperties.props");

     

    Hope this can help.

     

    Best Regards,

    Ziwei Chen


    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.
    Thursday, December 2, 2010 6:20 AM
  • Hi Victor,

    does not work :-(

    function AddConfig(proj, strProjectName)
    {
      try
      {
    
        VCProject vcproj = proj.Object As VCProject;
        VCConfiguration vcconfig = vcproj.Configurations("Debug");
    	vcconfig.AddPropertySheet("R:\\MCLIB\\APPLICATIONS\\ApplicationProperties.props");
    
    
    	...
       }
    }<br/>
    

    Messages in Output:
    --------------------

    Javascript Intellisense Message: JSIntellisense:Internal/(106:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(106:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(106:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(106:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(106:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(106:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(106:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(106:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(109:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:42) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(109:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:42) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(109:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:42) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(110:8) : 'VCConfiguration' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(109:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:42) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(110:8) : 'VCConfiguration' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(109:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:42) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(110:8) : 'VCConfiguration' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:8) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:18) : Object required
    Javascript Intellisense Message: JSIntellisense:Internal/(109:39) : 'As' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(109:42) : 'VCProject' is undefined
    Javascript Intellisense Message: JSIntellisense:Internal/(110:8) : 'VCConfiguration' is undefined

    Error Dialog after start of User Wizard:
    ----------------------------------------

    Microsoft JScript compilation error
    Expected ';'
        VCProject vcproj = proj.object As VCProject;

     

    Best regards
    Walter

     

    Thursday, December 2, 2010 10:23 AM
  • Hello Walter,

     

    Thank you for your question.

     

    I am currently looking into this issue and will give you an update as soon as possible.

     

    Thank you for your understanding and support.

     

    Best Regards,

    Ziwei Chen


    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.
    Friday, December 3, 2010 2:23 AM
  • Hi Victor,

    do you have some news?

    Best Regards

    Walter

     

    Friday, December 17, 2010 9:40 AM
  • Hi Victor,

    still waiting for a solution.

    Best regards
    Walter

    Wednesday, March 23, 2011 12:00 PM