## Problem: ForexConnect and VS 15

Moderator: Moderator

### Problem: ForexConnect and VS 15

I have a problem to connect the API and VS 15.

I have tried the following procedure:

http://fxcodebase.com/wiki/index.php/How_to_Start_Using_ForexConnect_.NET_API_(Win32/Win64)

The problem is the post build event line:

copy "C:\Program Files\Candleworks\ForexConnectAPI\bin\*.*" "\$(TargetDir)"

When i create the project VS shows an error message: C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073:

When i try to copy all files from the bin folder to my project folder i get also an error.
Tullius

Posts: 2
Joined: Fri May 19, 2017 6:42 pm

### Re: Problem: ForexConnect and VS 15

The first problem is solved.

The correct path is ForexConnectAPIx64 instead of simply ForexConnectAPI.

Now the next obstacle. In VS 2015 the code appears correct (no error messages) but when i run the build it throws "System.IO.FileNotFoundException". The is caused because of a missing "fxcore2.dll" or dependence. The fxcore2 is in place. I have checked it (My.Computer.FileSystem.FileExists...) and it is registered. But what is the "dependence" ?
Tullius

Posts: 2
Joined: Fri May 19, 2017 6:42 pm

### Re: Problem: ForexConnect and VS 15

Hello, Tullius.

> But what is the "dependence" ?
DLL's from C:\Program Files\Candleworks\ForexConnectAPIx64\bin\ and C:\Program Files\Candleworks\ForexConnectAPIx64\bin\net\dotnet40\msvcr100.dll
are dependencies of fxcore2.dll.

1.
Open a Solution Explorer. To access Solution Explorer, select Solution Explorer on the View menu. Click on your project in Solution Explorer and expand one, then right click on the "Dependencies", choose "Add Reference" item in the context menu. Click on the "Browse..." button, then find and select fxcore2.dll (C:\Program Files\Candleworks\ForexConnectAPIx64\bin\net\dotnet40\fxcore2.dll) and add one to project dependencies.

2.
Copy all DLLs from C:\Program Files\Candleworks\ForexConnectAPIx64\bin\ and C:\Program Files\Candleworks\ForexConnectAPIx64\bin\net\dotnet40\ to \${TargetDir}
(target dir is a directory where will be placed your build application).

3.
Then build the project and run it.
ghost_lynx

Posts: 2
Joined: Wed Aug 02, 2017 3:36 am