locked
Visual Studio Platform Toolset in jscript RRS feed

  • Question

  • I wrote a Application Wizard in HTML/Jscript like the standard C++ generic application wizard in Visual Studio 2008/2010.

    Now when I am in Visual Studio 2010, I'd like to for the 'Platform Toolset' to be v90. I haven't found a way to make the change from the companion JScript. Anyone can shed a light?

    I can for example do this: config.useOfAtl =useATLNotSet;
    but no clue for Platform Toolset = v90

    Thx

    • Moved by Yi Feng Li Monday, January 17, 2011 4:59 AM VSX issue (From:Visual C++ Language)
    Thursday, January 13, 2011 9:46 AM

Answers

  • Hi Cyrillef1,

     

    Thanks for your post.

    I suppose you'd like to change TargetFramework and PlatformToolset programmatically,

    if so, I suggest to try ToolsVersion property of Project Class

    By the way, I'm not quite clear about your code

    selproj.Object.TartgetFrameworkVersion =eFrameworkVersion35;

    Is it .Net code or JS/HTML? How do you implement the wizard?

    If I misunderstand your issue, be free to let me know.

    Best Regards,

    Ziwei Chen

     

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

     

     


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Victor_Chen Thursday, January 20, 2011 8:29 AM
    Monday, January 17, 2011 7:05 AM

All replies

  • Forgot to tell that I workaround the problem doing this

    selproj.Object.TartgetFrameworkVersion =eFrameworkVersion35;

    this force the PlatformToolset to v90 as the MSBuild/Microsoft.Cpp/v4.0/Microsoft.Cpp.Defaults.props will force it. But that sounds ugly if I do not use .Net, or if I need 4.0

    Thx

    Thursday, January 13, 2011 12:58 PM
  • Hi Cyrillef1,

     

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thank you for your understanding and support.

     

    EDIT* I'm moving this thread to VSX Forum for better support.

     

    Regards,

     

    Yi Feng Li

     

     

     


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 17, 2011 3:49 AM
  • Hi Cyrillef1,

     

    Thanks for your post.

    I suppose you'd like to change TargetFramework and PlatformToolset programmatically,

    if so, I suggest to try ToolsVersion property of Project Class

    By the way, I'm not quite clear about your code

    selproj.Object.TartgetFrameworkVersion =eFrameworkVersion35;

    Is it .Net code or JS/HTML? How do you implement the wizard?

    If I misunderstand your issue, be free to let me know.

    Best Regards,

    Ziwei Chen

     

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

     

     


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Victor_Chen Thursday, January 20, 2011 8:29 AM
    Monday, January 17, 2011 7:05 AM
  • Hi Cyrillef1,

     

    Is it resolved?

     Ziwei Chen

     

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

     

     


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 20, 2011 8:29 AM
  • Hi there

     

    I note the tip above "I suppose you'd like to change TargetFramework and PlatformToolset programmatically, if so, I suggest to try ToolsVersion property of Project Class"

     

    The question I have is, how do I obtain the Project class from within the DTEApplication.Solution object model? Is it possible?

     

    i want to change the Platform Toolset in my users Visual Studio 2010 project General settings from V90 to V100 using this code from my Visual Studio Addin... How can I do it?

     

           int projects = 0;

          // loop through each project

          foreach (Project project in VisualTeefyApp.DTEApplication.Solution.Projects)

          {

            try

            {

              ++projects;

              VCProject vcProject = (VCProject)project.Object;

              IVCCollection configs = (IVCCollection)vcProject.Configurations;

              // loop through the configs

              for (int i = 1; i <= configs.Count; ++i)

              {

                try

                {

     

                  VCConfiguration cfg = (VCConfiguration)configs.Item(i);

                  VCProject projectCfg = (VCProject)cfg; 

                  FixGeneralSettings(cfg);

     

                  VCPlatform platform = (VCPlatform)cfg.Platform;

     

                  IVCCollection tools = (IVCCollection)cfg.Tools;

                  VCCLCompilerTool compilerTool = (VCCLCompilerTool)tools.Item("VCCLCompilerTool");

                  FixCompilerSettings(compilerTool, bufferOverrun);

     

                  VCLinkerTool linkerTool = (VCLinkerTool)tools.Item("VCLinkerTool");

                  FixLinkerSettings(linkerTool);

                }

                catch

                {

                }

              }

            }

            catch

            {

              MessageBox.Show(null, "Project " + project.FullName + " is not a VC++ project, skipping...", VisualTeefyApp.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);

            }

          }

    Friday, September 9, 2011 8:20 PM