Main Content

Code Archive, C# Wrapper Files, and .NET Assembly File Placement

To ensure your C# application has access to the generated code archive (.ctf file), the C# wrapper files, and the .NET assembly, these files need to be placed in the right location. The suitable location varies based on your selected integration process.

Note

Utilizing the .NET assembly (.dll file) during integration negates the need for C# wrapper files, and vice versa.

Integrate via .NET SDK Command Line API

  • Copy the following files produced by the compiler.build.dotNETAssembly function to the project folder created by dotnet new, alongside the Program.cs C# application code file:

    • C# wrapper files from the ...\output\strongly_typed_interface\ directory. output refers to the directory where the output from the compiler.build.dotNETAssembly function is stored.

    • Code archive (.ctf file) from the \output directory.

  • Edit the project file and add the code archive (.ctf file) as a Content file.

  • Add a reference to the .NET assembly (.dll file) by editing the project file, and within the <ItemGroup> tag, adding it as a Reference, and providing its path.

Integrate via Microsoft Visual Studio

  • Add the code archive (.ctf file), C# wrapper files, and .NET assembly file to your Visual Studio® project using the Solution Explorer. This is done by right-clicking your project and selecting Add > Existing Item.

  • Right-click the code archive (.ctf file) in Solution Explorer and select Properties. In the Properties window, set Build Action to Content and Copy to Output Directory to Copy always.

  • Right-click your solution in Solution Explorer and choose Edit Project File. Here, you'll need to add a reference to the .dll file within the existing <ItemGroup> tag.

See Also

Related Topics