Skip to content

Commit 940b940

Browse files
authored
Update README.md
1 parent b152377 commit 940b940

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# C# bindings
22

3-
The is the C# interface to the lab streaming layer. To use it, you need to include the file LSL.cs in your project, and make sure that the appropriate lsl library (e.g. lsl.dll) is findable (e.g., in your application's root directory or in a system path).
3+
The is the C# interface to the lab streaming layer. To use it, you need to include the file LSL.cs in your project, and make sure that the appropriate lsl library (e.g. lsl.dll) is findable (e.g., in your application's root directory or in a system path). If LSL.cs fails to find the lsl shared library for your target platform, edit LSL.cs and update the libname line with the library name for your target platform. As of liblsl 1.14, this should be the same for all targets: `const string libname = "lsl";`
4+
5+
## Using Visual Studio 2019
6+
7+
* Make sure you have the .NET desktop development pack installed.
8+
* Open the liblsl.sln file. If you are asked to upgrade then go ahead.
9+
* Add lsl.dll to your solution.
10+
* In the solution explorer, right click on the `liblsl` target and choose `Add > Existing Item ...`.
11+
* In the new explorer window, change the `Add` dropdown button to `Add as Link` and change the file types/extensions to `all files (*.*)`. Browse to where you have lsl.dll ([previously downloaded from here](https://github.com/sccn/liblsl/releases)) and select it.
12+
* Click on the lsl.dll entry now in the solution explorer to view its properties.
13+
* Set "Build Action" to "Content" and "Copy to Output Directory" to "Copy if newer".
414

5-
If using Visual Studio 2019, make sure you have the .NET desktop development pack installed. Then open the liblsl.sln file. If you are asked to upgrade then go ahead. In the solution explorer, right click on the `liblsl` target and choose `Add > Existing Item ...`. In the explorer window, change the `Add` dropdown button to `Add as Link` and change the file types/extensions to "all files (*.*)". Browse to where you have lsl.dll ([download from here](https://github.com/sccn/liblsl/releases)) and select it. Click on the lsl.dll entry now in the solution explorer to view its properties. Set "Build Action" to "Content" and "Copy to output directory" to "Copy if newer". Whenever a target in the solution is built, the dll will be copied into the build directory.
615
![Visual Studio lsl.dll properties](img/vs2019_lsl_props.PNG)
716

8-
If LSL.cs fails to find the lsl shared library for your target platform, edit LSL.cs and update the following line with the library filename for your system: `const string libname = "lsl";`
17+
From now on, whenever a target in the solution is built, lsl.dll will be copied into the build directory.
918

1019
# C# Example Programs
1120

0 commit comments

Comments
 (0)