DotNetCall.CreateCode
- Aktualisiert2025-07-21
- 2 Minute(n) Lesezeit
DotNetCall.CreateCode
Syntax
DotNetCall.CreateCode
Return Value
Specifies whether the DotNetCall object was modified.
Purpose
Launches Microsoft Visual Studio to create code for the .NET call.
Remarks
For DotNetModule objects, use this method instead of the Module.CreateCode method.
This method creates a method in the class the DotNetCall.ClassName property specifies. This method uses the DotNetCall.MemberName property as the name of the method to create. The content of the code depends on the code templates configured for the step type of the step that contains the DotNetCall object. Use the Module.CanCreateCode property to determine whether this step can create code.
If you do not specify any files for the DotNetModule.ProjectFilePath or DotNetModule.SourceFilePath properties, call this method to prompt the user to specify the project and source files. The adapter stores the specified project file in the step, but the source file you select applies only to the current .NET call.
When you call this method, you might receive additional prompts to determine whether any of the following conditions exist:
- Multiple versions of Visual Studio exist on the computer and you select the Always Prompt for Version option from the Version of Visual Studio to Use for Create and Edit Code ring control in the .NET Adapter Configuration dialog box.
- Multiple versions of Visual Studio exist on the computer and you select the use the Version that Matches the Project File option from the Version of Visual Studio to Use for Create and Edit Code ring control in the .NET Adapter Configuration dialog box, and TestStand cannot match the version of the file.
- A method already exists with the same signature.
- The specified solution does not contain the specified project.
- The specified project does not contain the specified source file.