Forum Discussion

AdamUK's avatar
AdamUK
Occasional Contributor
6 years ago
Solved

C# Script not available as a project option in a new web project.

When I start a new project I am unable to select C# Script as an option.  In the help file it says I should have the option but I don't.

  • It depends upon how you go in to the "wizard" for creating a new project.  If you go to the File | New | New Project option, you are correct that C# Script is not provided as an option.  

     

    If, however, you have a Project Suite and right click on the suite node in the explorer and select Add | New Item and start from there, that set of dialogs allows you to select C# Script as a language.

     

    Technically speaking, though, the only reason to write in C# Script is if you're intending on building connected applications in TestComplete... something which has been deprecated.  You can easily create a project using JScript and simply use C# Script syntax and it will still work fine. This is explained in the help as such:


    TestComplete also supports C#Script and C++Script, which are not listed in the Project Wizard. These are legacy languages used to create test code that can be imported into Connected and Self-Testing applications.

    To create a project that uses legacy C#Script or C++Script, use the TestComplete menu command File | New | New Project.

    Note: Despite the name, C#Script and C++Script are not the same as C# and C++, they are based on legacy JScript. If you want to write tests in C#, use TestLeft. In TestComplete, the scripting language closest to C# and C++ in terms of syntax is JavaScript.

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    It depends upon how you go in to the "wizard" for creating a new project.  If you go to the File | New | New Project option, you are correct that C# Script is not provided as an option.  

     

    If, however, you have a Project Suite and right click on the suite node in the explorer and select Add | New Item and start from there, that set of dialogs allows you to select C# Script as a language.

     

    Technically speaking, though, the only reason to write in C# Script is if you're intending on building connected applications in TestComplete... something which has been deprecated.  You can easily create a project using JScript and simply use C# Script syntax and it will still work fine. This is explained in the help as such:


    TestComplete also supports C#Script and C++Script, which are not listed in the Project Wizard. These are legacy languages used to create test code that can be imported into Connected and Self-Testing applications.

    To create a project that uses legacy C#Script or C++Script, use the TestComplete menu command File | New | New Project.

    Note: Despite the name, C#Script and C++Script are not the same as C# and C++, they are based on legacy JScript. If you want to write tests in C#, use TestLeft. In TestComplete, the scripting language closest to C# and C++ in terms of syntax is JavaScript.