> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loqate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Integrate the Loqate .NET API using Microsoft Visual Studio

1. Launch Microsoft Visual Studio (the following screenshots are taken from Microsoft Visual Studio 2005).

2. Select File > New > Project

3. The New Project wizard will open. Highlight "Windows" under the Visual C# node on the left under Project types and "Console Application" under Templates on the right as seen below.

<Frame caption="">
  <img src="https://mintcdn.com/loqate/NzQbT46fbZrWgEKs/images/1.png?fit=max&auto=format&n=NzQbT46fbZrWgEKs&q=85&s=c62733a18a3fd585061e2c7e01b7aa4d" width="803" height="574" data-path="images/1.png" />
</Frame>

4. Enter the name for your project in the Name field and select OK (this will automatically populate the Solution name with the same name). For this example, we will use "csharpexample."

5. The Loqate .NET API is referenced through the `lqtnetc.dll` file so we will add this reference. Highlight and right-click the "csharpexample" project in the Explorer window. Select "Add Reference..."

6. The Add Reference window will open. Select the Browse tab and browse to the directory where your Loqate software is installed. Select the `lqtnetc.dll` file and select OK as seen below.

<Frame caption="">
  <img src="https://mintcdn.com/loqate/5ob_QWcOxwgHoz2p/images/Capture.png?fit=max&auto=format&n=5ob_QWcOxwgHoz2p&q=85&s=e239a6740e609845dec261a0341ad974" width="484" height="401" data-path="images/Capture.png" />
</Frame>

7. Next, we will use the Configuration Manager to make sure it is configured properly to build your project. Select the pull-down menu highlighted below and select Configuration Manager.

<Frame caption="">
  <img src="https://mintcdn.com/loqate/NzQbT46fbZrWgEKs/images/2.png?fit=max&auto=format&n=NzQbT46fbZrWgEKs&q=85&s=0ef5dab9cd042920696e47cfda11ffd8" width="1081" height="642" data-path="images/2.png" />
</Frame>

8. The Configuration Manager will open. In the "Project contexts" section, under Platform, select `<New...>`. The New Project Platform window will open as shown below. Select `x86` or `x64` in the New platform drop-down menu, depending if you have 32-bit or 64-bit. You can leave the default option, "Any CPU" selected for the Copy settings from options and leave the "Create new solution platforms" box checked and hit OK.

<Frame caption="">
  <img src="https://mintcdn.com/loqate/bZ7DNdFBXsoQxP4T/images/41.png?fit=max&auto=format&n=bZ7DNdFBXsoQxP4T&q=85&s=a1e73f1e8cbd79262e689f1fa7e3a5b0" width="718" height="451" data-path="images/41.png" />
</Frame>

9. Now we will add the C# sample file. Highlight and right-click the "csharpexample" project in the Explorer window and select Add > "Existing Item..." Browse to the directory where your Loqate software is installed and select the `lqtSample.cs` file and hit Add. You may have a default `Program.cs` file which had already been added when you first created your project. Go ahead and delete this file so you should now only have the `lqtSample.cs` file listed under your project.

<Frame caption="">
  <img src="https://mintcdn.com/loqate/bZ7DNdFBXsoQxP4T/images/6.png?fit=max&auto=format&n=bZ7DNdFBXsoQxP4T&q=85&s=db459464182f223544002491d9b37f97" width="712" height="456" data-path="images/6.png" />
</Frame>

10. Now we will build your solution. Highlight and right-click the "csharpexample" project in the Explorer window and select Build. Or you can select Build > Build Solution from the top. At the bottom will be the Output window where you will see if the build was successful or not.

11. Additionally in the Output window, you will see which directory the executable was created in. Browse to this directory and copy the `csharpexample.exe` file to your Loqate install directory. Your Loqate install directory should now have the following contents:

<Frame caption="">
  <img src="https://mintcdn.com/loqate/wwkAPZOZpT3jkoyU/images/files.png?fit=max&auto=format&n=wwkAPZOZpT3jkoyU&q=85&s=566d4486ef4a969c2bb082d5d6641f74" width="605" height="539" data-path="images/files.png" />
</Frame>

12. Open a command window and cd to your Loqate install directory. Run the `csharpexample.exe` file and you will see the output of the single record as seen below.

<Frame caption="">
  <img src="https://mintcdn.com/loqate/_M6UKnN7xWZAxsg3/images/cmd_1.png?fit=max&auto=format&n=_M6UKnN7xWZAxsg3&q=85&s=6712208b2b33d98e94716dba39bef0a2" width="679" height="428" data-path="images/cmd_1.png" />
</Frame>
