-
Notifications
You must be signed in to change notification settings - Fork 181
Building, Installing and Testing
Building and testing the script# repository is pretty straightforward. It does require Visual Studio 2012. The first step is to use git to clone a copy of the repository from either the master, or from your fork.
Alternatively you may download a snapshot of the entire repository as a zip... but the recommendation would be to create your fork as a starting point, as that will lend itself to contributing any changes you make back into the main project.
You can build the entire solution by opening up and building ScriptSharp.sln from the /src directory within Visual Studio. All of the binaries are built into /bin/Debug or /bin/Release within the repository.
Additionally, when building the Release version, the ZipX project will be built, to produce the ScriptSharp.vsix in the /bin directory visual studio extension to install Script# into Visual Studio, as well as all nuget packages in the /bin/Zip/Packages directory comprising of Script# functionality.
You can download a set of pre-built binaries (containing the vsix, and the folder of nuget packages).
First uninstall a previous build of Script# (the project and file templates) from Visual Studio through the Extension Manager in Visual Studio (Tools | Extensions and Updates menu). If you have version 0.7.5 or prior, you must uninstall Script# using Add/Remove Programs.
Then simply double click the .vsix from a release build. This will install new set of templates. Once you've done this, any new Script# projects you create will use the newly installed templates. Existing Script# projects will not be affected.
Second, add a private nuget package source pointing to the packages in your build. Use the (Tools | Library Package Manager | Package Manager Settings) menu to bring up the nuget settings. Create a new package Source called "Script# Local" and select the /bin/Zip/Packages folder within your Script# repository as the source. Once you've done this, you can select the new nuget packages to add functionality within those projects.
If you're making changes to the compiler or runtime scripts, you'll want to run the Script# tests, to make sure everything is working the way it should. Testing can be run via the Test solution within the /tests directory. Build the solution, and then choose Test | Run | All Tests. The status of the tests can be seen in the Text explorer window (Test | Windows | Test Explorer).
The tests use the debug binaries of Script# from /bin/Debug, so make sure you've first built the Debug flavor of the binaries. Browser tests run using QUnit (included) within Chrome.
The Visual Studio UI shows any diffs for failing tests. You can also see the full generated outputs from failing tests in the TestResults directory. You can use windiff to get a better diff representation by comparing baselines for each test (in the TestCases directory) with generated outputs.