Since the process of setting up VS with the script API isn't very obvious to newcomers and it'll inevitably get asked as more and more people try to get in, I want to give everybody a starting point as straightforward as I possibly could.
At the time of writing, this is only guaranteed to work with VS 2015. 2017 will crash.
-
Open a new project, and use an empty template.
(Make sure you select .NET Framework 4.6 at the top.)
-
Open the Add Reference window.
-
Add the two Sansar DLL files.
(You will find these in the Sansar client folder, in ScriptApi > Assemblies)
-
Also add the .NET System.dll.
- Click OK and you're ready!
From here you can add a new Class to your project and that will be your script. You should never need to make multiple projects, as each script is self-contained and you will not be compiling these files yourself. Scripts are compiled by the upload process in Sansar.
See: https://help.sansar.com/hc/en-us/sections/115001283328-Working-with-Scripts