Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gemtool_csharp_example [2021/07/17 19:15] wikiadmin |
gemtool_csharp_example [2023/09/13 12:29] (current) wikiadmin |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | This CSharp | + | This CSharp example uses the code generated from TransSECS using the .NET deployment option. |
1. Start TransSECS and load the [[GEMTool Sample Project]]. Generate the code with the .net option selected for deployment. | 1. Start TransSECS and load the [[GEMTool Sample Project]]. Generate the code with the .net option selected for deployment. | ||
2. The .net assembly (GEMTool.dll) which is needed for the CSharp example is in the project (GEMTool) directory under DOTNET. | 2. The .net assembly (GEMTool.dll) which is needed for the CSharp example is in the project (GEMTool) directory under DOTNET. | ||
+ | |||
+ | To prepare for testing this example, please load the SECSTester provided with TransSECS or load [[GEMHost Sample Project]] and generate the code so that TransSECS Builder in run/test mode can be used as a test Host. | ||
+ | |||
+ | **One-time .NET Project Setup** | ||
+ | |||
+ | When you first create your project you will need to modify your .csproj to include the TransSECS generated jar. You need to modify the ItemGroup to include the generated .jar file Reference and AssemblyName. | ||
+ | |||
+ | The names should follow your TransSECS project name, so if you're using the GEMTool sample project included with TransSECS and you have copied that jar in the lib folder of your project then you may have a lines like this: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | If your project was " | ||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | |||
+ | Here's the detailed steps using the GEMTool sample project as an example: | ||
+ | |||
+ | * Open a command prompt or PowerShell window. | ||
+ | |||
+ | * Navigate to your project directory. | ||
+ | |||
+ | * Run the following commands: | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | * Open your project' | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | * Add the following lines to your .csproj file: | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | * Remember to replace " | ||
+ | |||
+ | * Save and close the .csproj file. | ||
+ | |||
In the sample code below the tool is initialized, | In the sample code below the tool is initialized, |